/** * Construtor Controller **/ public function __construct() { //** ID: Silakan tambah inisialisasi controller sendiri disini //** EN: Please add your initialitation of controller in this //-- ID: Akhir tambah inisialisasi sendiri //-- EN: End add your initialitation $app = Kecik::getInstance(); $this->request = $app->request; $this->url = $app->url; $this->assets = $app->assets; $this->config = $app->config; if (isset($app->container)) { $this->container = $app->container; } if (isset($app->db)) { $this->db = $app->db; } if (isset($app->session)) { $this->session = $app->session; } if (isset($app->cookie)) { $this->cookie = $app->cookie; } if (isset($app->language)) { $this->language = $app->language; } }
/** * Construtor Controller **/ public function __construct() { //** ID: Silakan tambah inisialisasi controller sendiri disini //** EN: Please add your initialitation of controller in this //-- ID: Akhir tambah inisialisasi sendiri //-- EN: End add your initialitation $app = Kecik::getInstance(); $this->request = $app->request; $this->url = $app->url; $this->assets = $app->assets; $this->config = $app->config; $this->route = $app->route; $libraries = $app->getLibrariesEnabled(); while (list($idx, $library) = each($libraries)) { if (isset($library[1]) && !empty($library[1])) { $lib = $library[1]; $this->{$lib} = $app->{$lib}; } } /*if (isset($app->container)) $this->container = $app->container; if (isset($app->db)) $this->db = $app->db; if (isset($app->session)) $this->session = $app->session; if (isset($app->cookie)) $this->cookie = $app->cookie; if (isset($app->language)) $this->language = $app->language;*/ }