/** * Function is responsible for reading and writting configurations * @param unknown_type $property * @param unknown_type $value */ function config($property, $value = null) { $conf =& FiveFactory::getConfig(); $tmp = $conf; $parts = explode('.', $property); if (!is_null($value)) { //@TODO Save the configuration } foreach ((array) $parts as $part) { if (!$part) { return false; } if (!isset($tmp->{$part})) { return false; } $tmp = $tmp->{$part}; } if (count(get_object_vars($tmp)) < 2) { return (string) $tmp; } return $tmp; }
/** * function is responsible for returning the themes path */ function get_theme_path() { $conf = FiveFactory::getConfig(); return url() . 'five-contents/themes/' . $conf->theme->name . '/'; }
/** * Sets the Routing prefixes. Includes compatibilty for existing Routing.admin * configurations. * * @return void * @access private * @todo Remove support for Routing.admin in future versions. */ function __setPrefixes() { $conf =& FiveFactory::getConfig(); $routing = (array) $conf->routing; if (!empty($routing['admin'])) { $this->__prefixes[] = $routing['admin']; } if (!empty($routing['prefixes'])) { $this->__prefixes = array_merge($this->__prefixes, (array) $routing['prefixes']); } }