Back to BeforeReorderEvent class

Method setWhere

protected mixed
setWhere
(mixed $value)
Setter for the where argument
Parameters
  • array|string|null $value A string or array of where conditions.
Returns
  • mixed
-
  • \BadMethodCallException if the argument is not of the expected type

Method setWhere - Source code

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