Back to StatefulModelInterface class

Method setState

public mixed
setState
(mixed $property, mixed $value = null)
Method to set model state variables.
Parameters
  • string $property The name of the property.
  • mixed $value The value of the property to set or null.
Returns
  • mixed The previous value of the property or null if not set.
Since
  • 4.0.0

Method setState - Source code

/**
 * Method to set model state variables.
 *
 * @param   string  $property  The name of the property.
 * @param   mixed   $value     The value of the property to set or null.
 *
 * @return  mixed  The previous value of the property or null if not set.
 *
 * @since   4.0.0
 */
public function setState($property, $value = null);