DispatcherTrait
- Full name:
\Zemit\Dispatcher\DispatcherTrait
Methods
getNamespaceName
public getNamespaceName(): ?string
- This method is abstract.
getModuleName
public getModuleName(): ?string
- This method is abstract.
getActionName
public getActionName(): string
- This method is abstract.
getParams
public getParams(): array
- This method is abstract.
getHandlerClass
public getHandlerClass(): string
- This method is abstract.
getHandlerSuffix
public getHandlerSuffix(): string
- This method is abstract.
getActionSuffix
public getActionSuffix(): string
- This method is abstract.
getActiveMethod
public getActiveMethod(): string
- This method is abstract.
callActionMethod
{@inheritDoc} The string typed keys are not passed to the action method arguments Only the int keys will be passed
public callActionMethod( $handler, string $actionMethod, array $params = []): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$handler | **** | |
$actionMethod | string | |
$params | array |
forward
Extending forwarding event to prevent cyclic routing when forwarding under dispatcher events
public forward(array $forward, bool $preventCycle = false): void
Parameters:
Parameter | Type | Description |
---|---|---|
$forward | array | |
$preventCycle | bool |
canForward
Check whether the forward attribute can be forwarded we do additional checks to prevent dispatcher cycling
public canForward(array $forward): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$forward | array |
canForwardHandler
Check whether the handler is changed or not depending on the dispatcher MVC: controller CLI: task
private canForwardHandler(array $forward): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$forward | array |
canForwardController
Check whether the controller is changed
private canForwardController(?string $controller = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$controller | ?string |
canForwardTask
Check whether the task is changed
private canForwardTask(?string $task = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$task | ?string |
unsetForwardNullParts
public unsetForwardNullParts(array $forward, ?array $parts = null): array
Parameters:
Parameter | Type | Description |
---|---|---|
$forward | array | |
$parts | ?array |
toArray
public toArray(): array