本文整理汇总了PHP中Zend_Registry::Set方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Registry::Set方法的具体用法?PHP Zend_Registry::Set怎么用?PHP Zend_Registry::Set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Registry
的用法示例。
在下文中一共展示了Zend_Registry::Set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Zend_Log
Zend_Loader::loadClass('Zend_Controller_Front');
Zend_Loader::loadClass('Zend_Registry');
Zend_Loader::loadClass('Zend_View');
Zend_Loader::loadClass('Zend_Config_Ini');
Zend_Loader::loadClass('Zend_Db');
Zend_Loader::loadClass('Zend_Db_Table');
Zend_Loader::loadClass('Zend_Debug');
Zend_Loader::loadClass('Zend_Auth');
$logger = new Zend_Log(new Zend_Log_Writer_Null());
$config = new Zend_Config_Ini(PATH_ROOT . '/config/config.ini', 'general');
Zend_Registry::set('config', $config);
$config = Zend_Registry::get('config');
include "library/Gst/Loader.php";
$cache = Zend_Cache::factory('Core', 'File', array('lifetime' => 60 * 60 * 24), array('cache_dir' => 'public/temp'));
$cache->clean(Zend_Cache::CLEANING_MODE_OLD);
Zend_Registry::Set('cache', $cache);
$db = Zend_Db::factory($config->db->adapter, $config->db->config->toArray());
Zend_Db_Table::setDefaultAdapter($db);
Zend_Registry::set('db', $db);
$session = new Zend_Session_Namespace('gauravstomar');
Zend_Registry::set('session', $session);
try {
$front = Zend_Controller_Front::getInstance();
$front->throwExceptions(true);
$front->setControllerDirectory(PATH_ROOT . '/application/controllers');
$route['do-nothing'] = new Zend_Controller_Router_Route('take-two-minute-challenge', array('controller' => 'index', 'action' => 'donothing'));
$route['user'] = new Zend_Controller_Router_Route('user/:user/:tweet', array('controller' => 'users', 'action' => 'profile'));
$route['my'] = new Zend_Controller_Router_Route('my/', array('controller' => 'users', 'action' => 'index'));
$route['bio'] = new Zend_Controller_Router_Route('bio/:bio', array('controller' => 'users', 'action' => 'profile'));
$route['ref'] = new Zend_Controller_Router_Route('i/:ref', array('controller' => 'index', 'action' => 'index'));
$route['user'] = new Zend_Controller_Router_Route('user/:userid', array('controller' => 'index', 'action' => 'index'));