/** * Testing getting a configuration option. * @param to $key * @internal param \to $key search for * @return mixed result of configuration key. * @access public */ public static function getConfig($key) { if (isset(self::$configs[$key])) { return self::$configs[$key]; } //try load configuration file and try again. try { Configure::load('seo'); } catch (ConfigureException $e) { Configure::load('Seo.seo'); } self::$configs = Configure::read('Seo'); if (self::$configs[$key] = Configure::read("Seo.{$key}")) { return self::$configs[$key]; } return null; }
/** * Testing getting a configuration option. * @param key to search for * @return mixed result of configuration key. * @access public */ static function getConfig($key) { if (isset(self::$configs[$key])) { return self::$configs[$key]; } //try configure setting if (self::$configs[$key] = Configure::read("Seo.{$key}")) { return self::$configs[$key]; } //try load configuration file and try again. Configure::load('seo'); self::$configs = Configure::read('Seo'); if (self::$configs[$key] = Configure::read("Seo.{$key}")) { return self::$configs[$key]; } return null; }