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


PHP Zend_Loader_Autoloader::resetInstance方法代码示例

本文整理汇总了PHP中Zend_Loader_Autoloader::resetInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Loader_Autoloader::resetInstance方法的具体用法?PHP Zend_Loader_Autoloader::resetInstance怎么用?PHP Zend_Loader_Autoloader::resetInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Loader_Autoloader的用法示例。


在下文中一共展示了Zend_Loader_Autoloader::resetInstance方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: teardown

 public function teardown()
 {
     $loaders = spl_autoload_functions();
     foreach ($loaders as $loader) {
         spl_autoload_unregister($loader);
     }
     foreach ($this->loaders as $loader) {
         spl_autoload_register($loader);
     }
     Zend_Loader_Autoloader::resetInstance();
 }
开发者ID:padraic,项目名称:zfproposals,代码行数:11,代码来源:ConfiguratorTest.php

示例2: tearDown

 public function tearDown()
 {
     // Restore original autoloaders
     $loaders = spl_autoload_functions();
     foreach ($loaders as $loader) {
         spl_autoload_unregister($loader);
     }
     foreach ($this->loaders as $loader) {
         spl_autoload_register($loader);
     }
     // Reset autoloader instance so it doesn't affect other tests
     Zend_Loader_Autoloader::resetInstance();
 }
开发者ID:hjr3,项目名称:zf2,代码行数:13,代码来源:ResourceAbstractTest.php

示例3: tearDown

 public function tearDown()
 {
     // Restore original autoloaders
     $loaders = spl_autoload_functions();
     foreach ($loaders as $loader) {
         spl_autoload_unregister($loader);
     }
     foreach ($this->loaders as $loader) {
         spl_autoload_register($loader);
     }
     // Reset autoloader instance so it doesn't affect other tests
     Zend_Loader_Autoloader::resetInstance();
     ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode();
 }
开发者ID:ThorstenSuckow,项目名称:conjoon,代码行数:14,代码来源:JqueryTest.php

示例4: tearDown

 public function tearDown()
 {
     Zend_Db_Table::setDefaultAdapter(null);
     Zend_Db_Table::setDefaultMetadataCache();
     // Restore original autoloaders
     $loaders = spl_autoload_functions();
     foreach ($loaders as $loader) {
         spl_autoload_unregister($loader);
     }
     foreach ($this->loaders as $loader) {
         spl_autoload_register($loader);
     }
     // Reset autoloader instance so it doesn't affect other tests
     Zend_Loader_Autoloader::resetInstance();
 }
开发者ID:omusico,项目名称:logica,代码行数:15,代码来源:MultidbTest.php

示例5: tearDown

 public function tearDown()
 {
     if (method_exists('Doctrine_Manager', 'resetInstance')) {
         // as of 1.2ALPHA3
         Doctrine_Manager::resetInstance();
     }
     // Restore original autoloaders
     $loaders = spl_autoload_functions();
     foreach ($loaders as $loader) {
         spl_autoload_unregister($loader);
     }
     foreach ($this->loaders as $loader) {
         spl_autoload_register($loader);
     }
     // Reset autoloader instance so it doesn't affect other tests
     Zend_Loader_Autoloader::resetInstance();
 }
开发者ID:robo47,项目名称:parables,代码行数:17,代码来源:DoctrineTest.php

示例6: setUpWithEnv

 /**
  * Method to initialize Zend_Application for each test.
  */
 public function setUpWithEnv($applicationEnv)
 {
     // Reducing memory footprint by forcing garbage collection runs
     // WARNING: Did not work on CI-System (PHP 5.3.14, PHPnit 3.5.13)
     // gc_collect_cycles();
     $this->closeLogfile();
     $this->closeDatabaseConnection();
     // Resetting singletons or other kinds of persistent objects.
     Opus_Db_TableGateway::clearInstances();
     // FIXME Does it help with the mystery bug?
     Zend_Registry::_unsetInstance();
     // Reset autoloader to fix huge memory/cpu-time leak
     Zend_Loader_Autoloader::resetInstance();
     $autoloader = Zend_Loader_Autoloader::getInstance();
     $autoloader->suppressNotFoundWarnings(false);
     $autoloader->setFallbackAutoloader(true);
     // Clean-up possible artifacts in $_SERVER of previous test.
     unset($_SERVER['REMOTE_ADDR']);
     $this->bootstrap = new Zend_Application($applicationEnv, array("config" => array(APPLICATION_PATH . '/application/configs/application.ini', APPLICATION_PATH . '/tests/tests.ini', APPLICATION_PATH . '/tests/config.ini')));
     // added to ensure that application log messages are written to opus.log when running unit tests
     // if not set messages are written to opus-console.log
     $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';
     parent::setUp();
 }
开发者ID:belapp,项目名称:opus4-application,代码行数:27,代码来源:ControllerTestCase.php

示例7: tearDown

 public function tearDown()
 {
     if ($this->errorHandler !== null) {
         restore_error_handler();
     }
     // Restore original autoloaders
     $loaders = spl_autoload_functions();
     if (is_array($loaders)) {
         foreach ($loaders as $loader) {
             spl_autoload_unregister($loader);
         }
     }
     if (is_array($this->loaders)) {
         foreach ($this->loaders as $loader) {
             spl_autoload_register($loader);
         }
     }
     // Retore original include_path
     set_include_path($this->includePath);
     // Reset autoloader instance so it doesn't affect other tests
     Zend_Loader_Autoloader::resetInstance();
 }
开发者ID:netvlies,项目名称:zf,代码行数:22,代码来源:LoaderTest.php

示例8: testSingletonInstanceShouldAllowReset

 public function testSingletonInstanceShouldAllowReset()
 {
     Zend_Loader_Autoloader::resetInstance();
     $autoloader = Zend_Loader_Autoloader::getInstance();
     $this->assertNotSame($this->autoloader, $autoloader);
 }
开发者ID:netvlies,项目名称:zf,代码行数:6,代码来源:AutoloaderTest.php

示例9: set_include_path

<?php
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(dirname(__FILE__) . '/../library'),
    get_include_path(),
)));
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', 'testing');
defined('APPLICATION_LOAD_TESTDATA')
    || define('APPLICATION_LOAD_TESTDATA', true);

require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
spl_autoload_unregister(array($autoloader, 'autoload'));

Zend_Loader_Autoloader::resetInstance();
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('PHPUnit_');
开发者ID:nestorfabian,项目名称:REST-Example-App-for-Zend-Framework,代码行数:19,代码来源:phpunit-bootstrap.php

示例10: tearDown

 public function tearDown()
 {
     Zend_Loader_Autoloader::resetInstance();
 }
开发者ID:robo47,项目名称:robo47-components,代码行数:4,代码来源:HtmlPurifierStandaloneTest.php

示例11: _SF_Autloader_TearDown

function _SF_Autloader_TearDown()
{
    Zend_Loader_Autoloader::resetInstance();
    $loader = Zend_Loader_Autoloader::getInstance();
    $loader->registerNamespace('SF_');
}
开发者ID:AkimBolushbek,项目名称:zendframeworkstorefront,代码行数:6,代码来源:TestHelper.php

示例12: unregisterZend

 public static function unregisterZend()
 {
     if (!self::$zendLoaded) {
         return true;
     }
     Zend_Loader_Autoloader::resetInstance();
     spl_autoload_unregister(array('Zend_Loader_Autoloader', 'autoload'));
     self::$zendLoaded = false;
 }
开发者ID:te-koyama,项目名称:openpne,代码行数:9,代码来源:opApplicationConfiguration.class.php

示例13: tearDown

 public function tearDown()
 {
     Zend_Loader_Autoloader::resetInstance();
     Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true);
 }
开发者ID:robo47,项目名称:robo47-components,代码行数:5,代码来源:AutoloaderTest.php


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