public function __construct($files = array(), $type = 'js') { $this->files = new ArrayObject($files); $this->type = $type; $this->stapler = Templates_HTML_Assets_Join::Stapler($type); }
protected function dir($file = '') { $dir = Templates_HTML_Assets_Join::option('dir'); $ext = pathinfo($file, PATHINFO_EXTENSION); $paths = Templates_HTML::option('paths'); if (!empty($ext) && isset($paths[$ext])) { $dir = '/' . trim($paths[$ext] . '/' . trim($dir, PATH_SEPARATOR), '/'); } if (!is_dir('.' . $dir)) { IO_FS::mkdir('.' . $dir, IO_FS::option('dir_mod'), true); } return "{$dir}/{$file}"; }