Back to AfterMoveEvent class

Method setRow

protected mixed
setRow
(mixed $value)
Setter for the rows argument
Parameters
  • \stdClass|null $value The value to set
Returns
  • mixed
-
  • \BadMethodCallException if the argument is not of the expected type

Method setRow - Source code

/**
 * Setter for the rows argument
 *
 * @param   stdClass|null  $value  The value to set
 *
 * @return  mixed
 *
 * @throws  BadMethodCallException  if the argument is not of the expected type
 */
protected function setRow($value)
{
    if (!$value instanceof stdClass && !empty($value)) {
        throw new BadMethodCallException("Argument 'row' of event {$this->name} must be an stdClass object or null");
    }
    return $value;
}