lithium\action\Controller::__construct PHP Method

__construct() public method

Constructor.
See also: lithium\action\Controller::$request
See also: lithium\action\Controller::$response
See also: lithium\action\Controller::$_render
See also: lithium\action\Controller::$_classes
public __construct ( array $config = [] ) : void
$config array Available configuration options are: - `'request'` _object|null_: Either a request object or `null`. - `'response'` _array_: Options for constructing the response object. - `'render'` _array_: Rendering control options. - `'classes'` _array_
return void
    public function __construct(array $config = array())
    {
        $defaults = array('request' => null, 'response' => array(), 'render' => array(), 'classes' => array());
        parent::__construct($config + $defaults);
    }

Usage Example

Example #1
0
 public function __construct($config = null)
 {
     $this->api = new ApontadorApi();
     $this->location = new Location();
     if (!empty($config)) {
         parent::__construct($config);
     }
 }
All Usage Examples Of lithium\action\Controller::__construct