本文整理匯總了PHP中registry::destruct_started方法的典型用法代碼示例。如果您正苦於以下問題:PHP registry::destruct_started方法的具體用法?PHP registry::destruct_started怎麽用?PHP registry::destruct_started使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類registry
的用法示例。
在下文中一共展示了registry::destruct_started方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: destruct
public static function destruct($class, $class_hash = '')
{
if (self::$destruct_started) {
return;
}
self::$destruct_started = true;
self::$all_deps = array();
foreach (array_keys(self::$loaded) as $classname) {
$deps = $classname::__dependencies();
if (!empty($deps)) {
foreach ($deps as $name) {
if (isset(registry::$aliases[$name])) {
if (is_array(registry::$aliases[$name])) {
$dep_class = registry::$aliases[$name][0];
} else {
$dep_class = registry::$aliases[$name];
}
} elseif (registry::class_exists($name)) {
$dep_class = $name;
}
self::$all_deps[$dep_class][] = $classname;
}
}
}
self::_destruct($class, $class_hash);
self::$destruct_started = false;
}