App\Controllers\Admin\BaseController::__construct PHP 메소드

__construct() 공개 메소드

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

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