AbstractController
class AbstractController implements EventTriggerableInterface, Serializable (View source)
The Controller class.
Traits
Methods
Class init.
Run HMVC to fetch content from other controller.
Execute the controller.
Method to easily render view.
Process success.
Get view object.
getModel
setRedirect
redirect
addMessage
mute
isMute
Method to get property Package
Method to get property Container
Method to set property container
getApplication
getInput
Method to set property input
Method to get property Name
Method to set property name
Method to get property Config
Method to set property config
getRouter
Trigger an event.
Check this controller is in HMVC that we can close some behaviors.
Method to get property Request
Method to set property request
Method to get property Response
Method to set property response
getDataSource
addMiddleware
Method to get property Middlewares
Method to set property middlewares
__get
Serialize the controller.
Unserialize the controller.
Details
at line line 145
__construct(Input $input = null, AbstractPackage $package = null, Container $container = null)
Class init.
at line line 194
mixed
hmvc(string|AbstractController $task, Input|array $input = null, string $package = null)
Run HMVC to fetch content from other controller.
at line line 269
mixed
execute()
Execute the controller.
at line line 379
string
renderView(LayoutRenderableInterface|string $view, string $layout = 'default', string $engine = 'php', array $data = array())
Method to easily render view.
at line line 414
mixed
processSuccess(mixed $result)
Process success.
at line line 442
AbstractView|HtmlView
getView(string $name = null, string $format = 'html', string $engine = null, bool $forceNew = false)
Get view object.
at line line 521
ModelRepository
getModel(string $name = null, mixed $source = null, bool $forceNew = false)
getModel
at line line 588
AbstractController
setRedirect(string $url, int $code = 303, array $headers = array())
setRedirect
at line line 601
redirect(string $url, int $code = 303)
redirect
at line line 618
AbstractController
passRedirect(AbstractController $controller)
passRedirect
at line line 638
AbstractController
addMessage(string $messages, string $type = Bootstrap::MSG_INFO)
addMessage
at line line 655
AbstractController
mute(bool $bool = true)
mute
at line line 667
bool
isMute()
isMute
at line line 679
AbstractPackage
getPackage(int $backwards = 4)
Method to get property Package
at line line 735
AbstractController
setPackage(AbstractPackage $package)
Method to set property package
at line line 781
Container
getContainer()
Method to get property Container
at line line 800
AbstractController
setContainer(Container $container)
Method to set property container
at line line 813
WebApplication
getApplication()
getApplication
at line line 830
AbstractController
setApplication(WebApplication $app)
setApplication
at line line 842
Input
getInput()
getInput
at line line 859
AbstractController
setInput(Input $input)
Method to set property input
at line line 873
string
getName(integer $backwards = 2)
Method to get property Name
at line line 890
AbstractController
setName(string $name)
Method to set property name
at line line 902
Structure
getConfig()
Method to get property Config
at line line 919
AbstractController
setConfig(Structure $config)
Method to set property config
at line line 931
PackageRouter
getRouter()
getRouter
at line line 947
EventInterface
triggerEvent(EventInterface|string $event, array $args = array())
Trigger an event.
at line line 968
AbstractController|boolean
isHmvc(boolean $boolean = null)
Check this controller is in HMVC that we can close some behaviors.
at line line 985
ServerRequestInterface
getRequest()
Method to get property Request
at line line 997
AbstractController
setRequest(ServerRequestInterface $request)
Method to set property request
at line line 1009
ResponseInterface
getResponse()
Method to get property Response
at line line 1021
AbstractController
setResponse(ResponseInterface $response)
Method to set property response
at line line 1035
mixed
getDataSource(string $key = 'database')
getDataSource
at line line 1053
AbstractController
addMiddleware(callable|AbstractControllerMiddleware $middleware, int $priority = PriorityQueue::NORMAL)
addMiddleware
at line line 1065
PriorityQueue
getMiddlewares()
Method to get property Middlewares
at line line 1082
AbstractController
setMiddlewares(PriorityQueue $middlewares)
Method to set property middlewares
at line line 1098
mixed
__get(string $name)
__get
at line line 1130
string
serialize()
Serialize the controller.
at line line 1142
AbstractController
unserialize(string $input)
Unserialize the controller.