/** * Get SEO options * * @static * @access public * @return array */ public static function getOption() { $registry = Zend_Registry::getInstance(); $option = Dot_Settings::getOptionVariables($registry->requestModule, 'seo'); //remove the 'option' xml atribute $option->__unset('option'); $option->__set('canonicalUrl', Dot_Route::createCanonicalUrl()); return $option; }
// start the template object, empty for the moment require DOTKERNEL_PATH . '/' . $registry->requestModule . '/' . 'View.php'; $tpl = View::getInstance(TEMPLATES_PATH . '/' . $registry->requestModule); $tpl->init(); // assign Index Template file $tpl->setViewFile(); // set paths in templates $tpl->setViewPaths(); /** * each Controller must load its own specific models and views */ Dot_Settings::loadControllerFiles($registry->requestModule); /** * Load option(specific configuration file for current dot) file */ $option = Dot_Settings::getOptionVariables($registry->requestModule, $registry->requestControllerProcessed); $registry->option = $option; /** * Start the variable for Page Title, this will be used as H1 tag too */ $pageTitle = 'Overwrite Me Please !'; /** * From rev 833 * DotAuth::checkUserToken() will be given at least one parameter * $userToken - mandatory * $userType - optional - by default 'admin' * * To simplify it, we will put the variable $userToken * If we do not have the token, it will be marked with NULL * * NULL - user does not have a token
/** * Initialize the global variables * @access public * @static * @param int $startTime * @return bool $success */ public static function initialize($startTime) { // Create registry object, as read-only object to store there config, settings, and database $registry = self::_initializeRegistry(); // mark the start time $registry->startTime = $startTime; //Load configuration settings from application.ini file and store it in registry $config = new Zend_Config_Ini(CONFIGURATION_PATH . '/application.ini', APPLICATION_ENV); $registry->configuration = $config; //start the cache Dot_Cache::loadCache(); //Load routes(modules, controllers, actions) settings from router.xml file and store it in registry $registry->router = self::_loadRouter(); // load the plugin configuration $registry->pluginConfiguration = self::_loadPluginConfiguration(); //Load configuration settings from application.ini file and store it in registry $config = new Zend_Config_Ini(CONFIGURATION_PATH . '/application.ini', APPLICATION_ENV); $registry->configuration = $config; // Create connection to database, as singleton , and store it in registry $db = Zend_Db::factory('Pdo_Mysql', $config->database->params->toArray()); $registry->database = $db; //Load specific configuration settings from database, and store it in registry $settings = Dot_Settings::getSettings(); $registry->settings = $settings; //Set PHP configuration settings from application.ini file Dot_Settings::setPhpSettings($config->phpSettings->toArray()); // Extract the route from the URI Dot_Route::setRoute(); // initialize seo options $registry->seo = Dot_Route::getOption(); // initialize default options for dots that may be overwritten $option = Dot_Settings::getOptionVariables($registry->requestModule, 'default'); $registry->option = $option; return true; }