本文整理匯總了PHP中Registry::getRegistry方法的典型用法代碼示例。如果您正苦於以下問題:PHP Registry::getRegistry方法的具體用法?PHP Registry::getRegistry怎麽用?PHP Registry::getRegistry使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Registry
的用法示例。
在下文中一共展示了Registry::getRegistry方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: clear
function clear()
{
$registry =& Registry::getRegistry();
foreach (array_keys($registry) as $key) {
unset($registry[$key]);
}
}
示例2: delete
/**
* Remove an item from the registry.
* @param $key string
*/
function delete($key)
{
$registry =& Registry::getRegistry();
if (isset($registry[$key])) {
unset($registry[$key]);
}
}
示例3: start
/**
* Loads all aspects from configured paths and activates class loader.
*/
public function start()
{
$classLoader = new ClassLoader();
$aspectLoader = AspectLoader::getLoader();
$registry = Registry::getRegistry();
foreach ($this->getAspectPaths() as $aspectPath) {
$aspectLoader->loadAspects($aspectPath);
}
$aspectLoader->activate();
$aspectLoader->deactivate();
foreach ($aspectLoader->getAspects() as $aspectClass) {
$registry->parseClass($aspectClass);
}
$classLoader->activate();
}
示例4: __construct
/**
* @param \Lohini\Utils\Iban\Registry $registry
*/
public function __construct(Registry $registry = NULL)
{
if ($registry) {
$this->registry = $registry->getRegistry();
}
}