App\Controllers\Admin\BaseController::__construct PHP Method

__construct() public method

public __construct ( $container )
    public function __construct($container)
    {
        $this->containerSlim = $container;
        $this->view = $container->get('view');
        $this->csrf = $container->get('csrf');
        $this->flash = $container->get('flash');
        $this->router = $container->get('router');
        if ($messages = $this->containerSlim->get('flashMess')) {
            foreach ($messages as $key => $value) {
                $this->data[$key] = $value[0];
            }
        }
        $this->init();
    }

Usage Example

 public function __construct($container)
 {
     parent::__construct($container);
     $this->data = array('data' => array('html' => '', 'success' => '', 'error' => '', 'data' => ''));
 }