assets =& load_class('Assets'); $this->_set_asset_paths(); log_message('debug', "Assets Class Initialized"); } // -------------------------------------------------------------------- /** * Load Config File * * @access public * @param string the config file name * @return boolean if the file was loaded correctly */ function _set_asset_paths() { @include(APPPATH.'config/assets'.EXT); $this->assets = ( ! isset($assets) OR ! is_array($assets)) ? array() : $assets; unset($assets); $this->base_path = ( ! isset($this->assets['base']) ) ? FALSE : $this->assets['base']; } function get_asset_path($asset) { return $this->base_path.'/'.$this->assets[$asset]; } function get_asset_from_name($type, $name) { if(substr($name,0,7) == 'http://') return $name; return $this->base_path.'/'.$this->assets[$type].'/'.$name; } function get_asset_from_path($path) { return $this->base_path.'/'.$path; } // END CI_Config class } ?>