Back to AfterMoveEvent class

Method setWhere

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

Method setWhere - Source code

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