本文整理汇总了PHP中lang\ClassLoader::removeLoader方法的典型用法代码示例。如果您正苦于以下问题:PHP ClassLoader::removeLoader方法的具体用法?PHP ClassLoader::removeLoader怎么用?PHP ClassLoader::removeLoader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lang\ClassLoader
的用法示例。
在下文中一共展示了ClassLoader::removeLoader方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
/**
* Tear down this test. Removes classloader delegates registered
* during setUp()
*
*/
public function tearDown()
{
\lang\ClassLoader::removeLoader($this->libraryLoader);
\lang\ClassLoader::removeLoader($this->containedLoader);
\lang\ClassLoader::removeLoader($this->brokenLoader);
}
示例2: removeClientClassLoader
public static function removeClientClassLoader()
{
self::$clientClassesLoader && \lang\ClassLoader::removeLoader(self::$clientClassesLoader);
}
示例3: tearDown
/**
* Tears down test, removing all loaders registered with the CL.
*/
public function tearDown()
{
foreach ($this->registered as $l) {
ClassLoader::removeLoader($l);
}
}
示例4: tearDown
/**
* Removes class loader
*/
public function tearDown()
{
\lang\ClassLoader::removeLoader($this->cl);
}
示例5: tearDown
/**
* Tear down this test. Removes classloader delegates registered
* during setUp()
*
*/
public function tearDown()
{
\lang\ClassLoader::removeLoader($this->libraryLoader);
}
示例6: main
/**
* Entry point method
*
* @param string[] args
*/
public static function main(array $args)
{
if (empty($args)) {
return self::usage();
}
foreach (ClassLoader::getLoaders() as $loader) {
if ($loader instanceof JitClassLoader) {
ClassLoader::removeLoader($loader);
}
}
// Set up compiler
$compiler = new Compiler();
$manager = new FileManager();
$manager->setSourcePaths(\xp::$classpath);
// Handle arguments
$profiles = ['default'];
$emitter = 'php5.5';
$result = function ($success) {
return $success ? 0 : 1;
};
$files = [];
$listener = new DefaultDiagnosticListener(Console::$out);
for ($i = 0, $s = sizeof($args); $i < $s; $i++) {
if ('-?' === $args[$i] || '--help' === $args[$i]) {
return self::usage();
} else {
if ('-cp' === $args[$i]) {
\lang\ClassLoader::registerPath($args[++$i]);
} else {
if ('-sp' === $args[$i]) {
$manager->addSourcePath($args[++$i]);
} else {
if ('-v' === $args[$i]) {
$listener = new VerboseDiagnosticListener(Console::$out);
} else {
if ('-q' === $args[$i]) {
$listener = new QuietDiagnosticListener(Console::$out);
} else {
if ('-t' === $args[$i]) {
$levels = LogLevel::NONE;
foreach (explode(',', $args[++$i]) as $level) {
$levels |= LogLevel::named($level);
}
$compiler->setTrace(create(new LogCategory('xcc'))->withAppender(new ConsoleAppender(), $levels));
} else {
if ('-E' === $args[$i]) {
$emitter = $args[++$i];
} else {
if ('-p' === $args[$i]) {
$profiles = explode(',', $args[++$i]);
} else {
if ('-o' === $args[$i]) {
$output = $args[++$i];
$folder = new Folder($output);
$folder->exists() || $folder->create();
$manager->setOutput($folder);
} else {
if ('-N' === $args[$i]) {
$dir = $args[++$i];
$manager->addSourcePath($dir);
$files = array_merge($files, self::fromFolder($dir, false));
} else {
if (is_dir($args[$i])) {
$dir = $args[$i];
$manager->addSourcePath($dir);
$files = array_merge($files, self::fromFolder($dir, true));
} else {
$files[] = new FileSource(new File($args[$i]));
}
}
}
}
}
}
}
}
}
}
}
}
// Check
if (empty($files)) {
Console::$err->writeLine('*** No files given (-? will show usage)');
return 2;
}
// Setup emitter
sscanf($emitter, '%[^0-9]%d.%d', $language, $major, $minor);
try {
$emit = \lang\XPClass::forName('xp.compiler.emit.Emitter')->cast(Package::forName('xp.compiler.emit')->getPackage($language)->loadClass(($major ? 'V' . $major . $minor : '') . 'Emitter')->newInstance());
} catch (\lang\ClassCastException $e) {
Console::$err->writeLine('*** Not an emitter implementation: ', $e->compoundMessage());
return 4;
} catch (\lang\IllegalAccessException $e) {
Console::$err->writeLine('*** Cannot use emitter named "', $emitter, '": ', $e->compoundMessage());
return 4;
//.........这里部分代码省略.........