Behavior
- Full name:
\Zemit\Mvc\Controller\Traits\Behavior
Methods
beforeExecuteRoute
public beforeExecuteRoute(): void
attachBehavior
Attach a behavior to the object.
public attachBehavior(string $eventClass, string|null $eventType = null, int|null $priority = null): void
Parameters:
Parameter | Type | Description |
---|---|---|
$eventClass | string | The behavior to attach. |
$eventType | **string | null** |
$priority | **int | null** |
attachBehaviors
Attach multiple behaviors to the object.
public attachBehaviors(array $behaviors = [], string|null $eventType = null, int|null $priority = null): void
Parameters:
Parameter | Type | Description |
---|---|---|
$behaviors | array | An array of behaviors to attach. |
$eventType | **string | null** |
$priority | **int | null** |