Abstract Class Yiisoft\ActiveRecord\Event\Handler\AttributeHandlerProvider
Abstract class for event handlers provider based on class attributes.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ActiveRecord\Event\Handler\AttributeHandlerProvider | |
| getEventHandlers() | Returns array with event class names as keys and their handlers as values [event_class => handler_closure, ...] |
Yiisoft\ActiveRecord\Event\Handler\AttributeHandlerProvider |
| getPropertyNames() | Returns the list of property names the handler should be applied to. | Yiisoft\ActiveRecord\Event\Handler\AttributeHandlerProvider |
| setPropertyNames() | Sets the list of property names the handler should be applied to. | Yiisoft\ActiveRecord\Event\Handler\AttributeHandlerProvider |
Method Details
| public mixed __construct ( string $propertyNames ) | ||
| $propertyNames | string |
Names of properties the handler should be applied to. |
public function __construct(
string ...$propertyNames,
) {
$this->propertyNames = $propertyNames;
}
Returns array with event class names as keys and their handlers as values [event_class => handler_closure, ...]
| public abstract array getEventHandlers ( ) |
abstract public function getEventHandlers(): array;
Returns the list of property names the handler should be applied to.
| public string[] getPropertyNames ( ) |
public function getPropertyNames(): array
{
return $this->propertyNames;
}
Sets the list of property names the handler should be applied to.
| public void setPropertyNames ( string[] $propertyNames ) | ||
| $propertyNames | string[] | |
public function setPropertyNames(array $propertyNames): void
{
$this->propertyNames = $propertyNames;
}
Signup or Login in order to comment.