本文整理汇总了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();
}
}