当前位置: 首页>>代码示例>>PHP>>正文


PHP ClassLoader::removeLoader方法代码示例

本文整理汇总了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);
 }
开发者ID:melogamepay,项目名称:xp-framework,代码行数:11,代码来源:ClassLoaderTest.class.php

示例2: removeClientClassLoader

 public static function removeClientClassLoader()
 {
     self::$clientClassesLoader && \lang\ClassLoader::removeLoader(self::$clientClassesLoader);
 }
开发者ID:melogamepay,项目名称:xp-framework,代码行数:4,代码来源:IntegrationTest.class.php

示例3: tearDown

 /**
  * Tears down test, removing all loaders registered with the CL.
  */
 public function tearDown()
 {
     foreach ($this->registered as $l) {
         ClassLoader::removeLoader($l);
     }
 }
开发者ID:xp-framework,项目名称:core,代码行数:9,代码来源:ModuleLoadingTest.class.php

示例4: tearDown

 /**
  * Removes class loader
  */
 public function tearDown()
 {
     \lang\ClassLoader::removeLoader($this->cl);
 }
开发者ID:melogamepay,项目名称:xp-framework,代码行数:7,代码来源:ResourcesTest.class.php

示例5: tearDown

 /**
  * Tear down this test. Removes classloader delegates registered 
  * during setUp()
  *
  */
 public function tearDown()
 {
     \lang\ClassLoader::removeLoader($this->libraryLoader);
 }
开发者ID:melogamepay,项目名称:xp-framework,代码行数:9,代码来源:PackageTest.class.php

示例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;
//.........这里部分代码省略.........
开发者ID:xp-lang,项目名称:compiler,代码行数:101,代码来源:CompileRunner.class.php


注:本文中的lang\ClassLoader::removeLoader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。