Свойство | Тип | Описание | |
---|---|---|---|
$abort | boolean | Flag to abort the execution of a controller | |
$actionName | string | The action's name being called | |
$actionView | The action view to use | ||
$controllerName | String | The controller's name | |
$httpStatusCode | integer | The default status code | |
$moduleName | String | The module name | |
$namespace | string | The full namespace of the controller | |
$reflection | Reflection | The reflection of the called class |
Метод | Описание | |
---|---|---|
__construct ( array $segments = [] ) | final construct so no other class can override it To load something in the constructor, use init() | |
__destruct ( ) | It's a wrap By default, when the destructor is called, it will render the views To disable view, in your controller set: $this->disableView(true) | |
__toString ( ) : string | Return the full name of the class | |
actionIndex ( ) | This is the index action. | |
catchNumericSegment ( ) : mixed | To catch the first numeric value from the URL segment. ie: /music/rap/12573/Where-Have-You-Been. Will return 12573 | |
disableView ( $bool = true ) : |
To enable render view. on __destruct, it will render the view, otherwise it's up to the controller to launch it. | |
getAction ( string $action = "Index" ) : |
Load an action by providing just the name without the Action suffix. | |
getActionMethodName ( ) : string | Return the full name of the method | |
getActionName ( ) : string | Return the last action name saved | |
getActionUrl ( ) : string | Return the action url | |
getApplicationDir ( ) : string | Get the application | |
getBaseDir ( ) : string | Return the root dir relative to the Application dir Use it to include files, or get relative path of file | |
getBaseUrl ( ) : string | Return the root url which will properly format the url so it adds or not ? to make the relative link | |
getConfig ( type $key = null ) : mixed | To access config info | |
getControllerName ( ) : string | Return the controller's name | |
getControllerUrl ( ) : string | Return the url for the controller | |
getIp ( ) : string | Return the user agent ip | |
getModuleDir ( ) : string | Get the module directory | |
getModuleName ( ) : string | Return the module's name | |
getModuleNamespace ( ) | ||
getModuleUrl ( ) : string | Return the URL of the module | |
getParam ( string $key = null, mixed $default = null ) : mixed | Get POST or GET param | |
getParams ( ) : Array | Return all the request params of GET and POST | |
getRequestURI ( ) : string | To get the request uri. It includes everything in the URI | |
getSegment ( $key = null, $offset ) : mixed | Segements are part of the URL separated by / ie: /gummy/bear/?q=hello 'gummy' and 'bear' are segments. | |
getSiteUrl ( ) : string | Return the site url itself | |
isAjax ( ) : boolean | CHeck request if it's an ajax request | |
isGet ( ) : boolean | Bool if the request method is a GET | |
isPost ( ) : boolean | Bool if the request method is a POST | |
redirect ( $url = "", integer $httpCode = 302 ) | To redirect the page to a new page | |
setHttpCode ( integer $code = 200 ) : Voodoo\Core\Controller | Set the http status code | |
toDate ( mixed $datetime, $format = null ) : string | Return a formatted date | |
toFriendlyUrl ( type $url ) : string | Return a string to friendly url |
Метод | Описание | |
---|---|---|
_exit ( ) : void | To completely exit the application just like calling exit(). | |
abort ( ) : |
Abort the execution of finalize() and renderView() of the application in __destruct | |
afterAction ( ) : |
afterAction() Execute the method after the Action is executed | |
beforeAction ( ) : |
beforeAction() Execute the method before the Action is executed | |
finalize ( ) : |
finalize() Code to excute before rendering | |
forwardTo ( string $controllerName, array $params = [] ) : |
forward, like getController, forward the current controller to a new controller and allows it to render the view, while it deactivate the current controller view. | |
getActionView ( ) : type | Return the action view | |
getController ( $controllerName, array $params = [] ) : Voodoo\Core\controller | To access another controller without rendering it | |
init ( ) : |
init() __construct is and can't be overriden by any child class init() lets you put code that could be executed in __construct() | |
renderView ( boolean $echoView = true ) : boolean | string | To render the controller's view | |
setActionName ( string $action ) | Set the action name | |
setActionView ( type $view ) : |
Set the action view to be displayed | |
view ( array $dataModel = null ) : Voodoo\Core\View | Return the View instance | |
viewExists ( ) : boolean | Verify if the view directory exists |
Метод | Описание | |
---|---|---|
dasherizeUrl ( type $str ) : string | Dasherize part for a url | |
getParentNamespace ( type $namespace ) : string | Return the parent namespace |
final public __construct ( array $segments = [] ) | ||
$segments | array |
final public __destruct ( ) |
public __toString ( ) : string | ||
Результат | string |
final protected abort ( ) : |
||
Результат |
abstract public actionIndex ( ) |
protected afterAction ( ) : |
||
Результат |
protected beforeAction ( ) : |
||
Результат |
public catchNumericSegment ( ) : mixed | ||
Результат | mixed | (int | null) |
public disableView ( $bool = true ) : |
||
Результат |
protected finalize ( ) : |
||
Результат |
public getActionMethodName ( ) : string | ||
Результат | string |
public getActionName ( ) : string | ||
Результат | string |
public getActionUrl ( ) : string | ||
Результат | string |
protected getActionView ( ) : type | ||
Результат | type |
public getApplicationDir ( ) : string | ||
Результат | string |
public getBaseDir ( ) : string | ||
Результат | string |
public getBaseUrl ( ) : string | ||
Результат | string |
protected getController ( $controllerName, array $params = [] ) : Voodoo\Core\controller | ||
$params | array | |
Результат | Voodoo\Core\controller |
public getControllerName ( ) : string | ||
Результат | string |
public getControllerUrl ( ) : string | ||
Результат | string |
public getModuleDir ( ) : string | ||
Результат | string |
public getModuleName ( ) : string | ||
Результат | string |
public getModuleUrl ( ) : string | ||
Результат | string |
public getParams ( ) : Array | ||
Результат | Array |
public getRequestURI ( ) : string | ||
Результат | string |
public getSegment ( $key = null, $offset ) : mixed | ||
Результат | mixed |
public getSiteUrl ( ) : string | ||
Результат | string |
protected init ( ) : |
||
Результат |
protected setActionName ( string $action ) | ||
$action | string |
protected setActionView ( type $view ) : |
||
$view | type | |
Результат |
public setHttpCode ( integer $code = 200 ) : Voodoo\Core\Controller | ||
$code | integer | |
Результат | Voodoo\Core\Controller |
public toFriendlyUrl ( type $url ) : string | ||
$url | type | |
Результат | string |
protected viewExists ( ) : boolean | ||
Результат | boolean |
protected bool $abort | ||
Результат | boolean |
protected string $actionName | ||
Результат | string |
protected String $controllerName | ||
Результат | String |
protected int $httpStatusCode | ||
Результат | integer |
protected string $namespace | ||
Результат | string |