/** * Initialize Assets * * @param $params * @throws FileNotFoundException */ public function init($params) { // build config parameters $config = new Configuration(); $config->buildConfig($params); // check driver $this->assetsUri = Safan::handler()->baseUrl . '/' . $config->getPath(); $this->compressor = new Compressor($config); $this->cssManager = new CssManager(DS . $config->getPath() . DS . 'css'); $this->jsManager = new JsManager(DS . $config->getPath() . DS . 'js'); $this->config = $config; // set to object manager $om = Safan::handler()->getObjectManager(); $om->setObject('assets', $this); }