Actions
in package
Factory class for actions
Table of Contents
Properties
- $action : ActionInterface
- Action
Methods
- __construct() : mixed
- Constructor
- create() : self
- Create action
- createActionInstance() : ActionInterface
- Create action instance
- createFromExtension() : self
- Create action from extension
- createFromModule() : self
- Create action form module
- createFromStorage() : self
- Create action located in storage file
- getAction() : ActionInterface
- Get action
- option() : self
- Set action option
- options() : self
- Set action options
- run() : ActionInterface
- Run action
Properties
$action
Action
private
ActionInterface
$action
Methods
__construct()
Constructor
public
__construct(ActionInterface $action) : mixed
Parameters
- $action : ActionInterface
create()
Create action
public
static create(string $class, string $packageName[, array<string|int, mixed> $options = [] ]) : self
Parameters
- $class : string
- $packageName : string
- $options : array<string|int, mixed> = []
Return values
selfcreateActionInstance()
Create action instance
public
static createActionInstance(string $class[, array<string|int, mixed> $options = [] ]) : ActionInterface
Parameters
- $class : string
- $options : array<string|int, mixed> = []
Return values
ActionInterfacecreateFromExtension()
Create action from extension
public
static createFromExtension(string $className, string $extensionName[, array<string|int, mixed> $options = [] ]) : self
Parameters
- $className : string
- $extensionName : string
- $options : array<string|int, mixed> = []
Return values
selfcreateFromModule()
Create action form module
public
static createFromModule(string $className, string $moduleName[, array<string|int, mixed> $options = [] ]) : self
Parameters
- $className : string
- $moduleName : string
- $options : array<string|int, mixed> = []
Return values
selfcreateFromStorage()
Create action located in storage file
public
static createFromStorage(string $storagePath[, string|null $className = null ][, array<string|int, mixed> $options = [] ]) : self
Parameters
- $storagePath : string
-
(relative)
- $className : string|null = null
- $options : array<string|int, mixed> = []
Return values
selfgetAction()
Get action
public
getAction() : ActionInterface
Return values
ActionInterfaceoption()
Set action option
public
option(string $name, mixed $value) : self
Parameters
- $name : string
- $value : mixed
Return values
selfoptions()
Set action options
public
options(array<string|int, mixed> $options) : self
Parameters
- $options : array<string|int, mixed>
Return values
selfrun()
Run action
public
run(mixed ...$params) : ActionInterface
Parameters
- $params : mixed