/** * This part is common for all running all parts of application (both Admin and Site) * * @param $app Name * of the part of application */ protected function _runBase($app) { parent::_runBase($app); $f3 = \Base::instance(); // tell Minify where to find Media, CSS and JS files for ($i = 0; $i < count($this->minify_paths); $i++) { \Minify\Factory::registerPath($f3->get('PATH_ROOT') . $this->minify_paths[$i]); } // add all media files $files = array(); $files['css'] = $this->getCSS('Site'); $files['js'] = $this->getJS('Site'); $files['less'] = $this->getLESS('Site'); foreach ($files as $type => $list) { if (count($list)) { foreach ($list as $file) { \Minify\Factory::$type($file); } } } }