當前位置: 首頁>>代碼示例>>PHP>>正文


PHP I2CE::resetFileSearch方法代碼示例

本文整理匯總了PHP中I2CE::resetFileSearch方法的典型用法代碼示例。如果您正苦於以下問題:PHP I2CE::resetFileSearch方法的具體用法?PHP I2CE::resetFileSearch怎麽用?PHP I2CE::resetFileSearch使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在I2CE的用法示例。


在下文中一共展示了I2CE::resetFileSearch方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testBrokenErase

 public function testBrokenErase()
 {
     $a = self::$c->getAvailableModules(array(self::data_dir(__CLASS__) . "/OneModuleWithClass"));
     TestMagicDataTearDown::brokenTearDown();
     I2CE::resetFileSearch();
     $this->assertEquals(array(), self::$not_errors);
     $this->assertEquals(array(), self::$errors);
     $this->setUp();
     $a = self::$c->getAvailableModules(array(self::data_dir(__CLASS__) . "/OneModuleWithClass"));
     $b = array();
     $this->assertEquals($b, $a);
     $this->assertRegExp("{Trying to get property of non-object}", self::$not_errors[0]);
     $this->assertContains("Got a NULL value for storage.", self::$errors);
     self::$errors = array();
     TestMagicDataTearDown::tearDown();
     I2CE::resetFileSearch();
     $this->assertEquals(array(), self::$errors);
 }
開發者ID:apelon-ohie,項目名稱:ihris-site,代碼行數:18,代碼來源:I2CE_MagicDataTest.php

示例2: tearDown

 function tearDown()
 {
     I2CE_MagicData::tearDown();
     I2CE::resetFileSearch();
 }
開發者ID:apelon-ohie,項目名稱:ihris-site,代碼行數:5,代碼來源:I2CE_ProcessTest.php

示例3: tearDown

 protected function tearDown()
 {
     I2CE_MagicData::tearDown();
     I2CE::resetFileSearch();
     I2CE::popErrorHandler(array(__CLASS__, "errorHandler"));
 }
開發者ID:apelon-ohie,項目名稱:ihris-site,代碼行數:6,代碼來源:I2CE_Framework_TestClass.php

示例4: checkRequirements

 /**
  * Checks the requirements.  if all requirements are met and
  * there are no conflicts, it returns a list of those that
  * need to be installed, an empty array() if none are needed.
  * On failure returns null.
  *
  * @param array $shortnames an array of shortnames
  *
  * @param mixed $disables a shortname or an array of
  * shortnames of modules to disable.  Defaults to empty array
  *
  * @param array $remove an array of potential shortnames to
  * remove -- if we did not find them somplace else. (it may
  * have just been moved) defaults to an empty array.
  * 
  * @param array $enabled_modules An array of shortnames of
  * enabled modules -- we check for conflicts against this
  * array
  *
  * @param mixed $required_modules A shortname or an array of
  * shortnames of required modules -- if a module is set to be
  * updated and it is not required by on of the modules in this
  * array, it will be set as an optional modules.  Defaults to
  * the empty array
  *
  * @returns array.  Keys are:
  *    'failure'      -  string with the reason for failture
  *    'requirements' -  array which has as keys shortnames and
  *                      values files for the requirements.
  *    'removals'     -  array of shortnames that need to be removed.
  *    'optional'     -  array with key shortnames and value true
  *    'moved'        -  array with key  shortnames and value true
  */
 public function checkRequirements($updates, $disables = array(), $removals = array(), $enabled_modules = array(), $required_modules = array(), $reset_moved = true)
 {
     if ($reset_moved) {
         $this->moved = array();
     }
     if ($this->storage->setIfIsSet($i2ce_config_file, "config/data/I2CE/file") && $i2ce_config_file != ($new_i2ce_config_file = rtrim(dirname(dirname(__FILE__)), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'I2CE_Configuration.xml')) {
         //we have moved location of I2CE.  Other things have likely gotten moved around as well and we do not want to use the stored paths.
         //the file search has been set in I2CE_Update->_updateSite()->needs_upgrade to  I2CE::setupFileSearch( array( "CLASSES" => "./", 'MODULES'=>array(dirname($site_module_file),dirname(dirname(__FILE__)))), true);
         $this->resetCheckedPaths();
         I2CE::resetFileSearch();
         $file_search = I2CE::getFileSearch();
         if (null === $file_search) {
             I2CE::raiseError("Resetting file search");
             I2CE::setupFileSearch();
             $file_search = I2CE::getFileSearch();
         }
         // just to make sure all of our module paths are loaded.
         $mod_factory = I2CE_ModuleFactory::instance();
         $mod_factory->resetStoredLoadedPaths();
         $mod_factory->loadPaths($mod, $path, true, $file_search, $this->storage->config->data);
     } else {
         $mods = array_unique(array_merge(array('I2CE'), $enabled_modules));
         $file_search = $this->setupFileSearch($mods);
     }
     $this->findAvailableConfigs($file_search, true);
     if (!$this->storage->is_parent("config/data")) {
         I2CE::raiseError("Data not loaded.", E_ERROR);
         return array('failure' => "Data not loaded");
     }
     I2CE::raiseError("Done looking for available config files.  Available:\n\t" . implode(',', $this->storage->config->data->getKeys()));
     $conflicts = array();
     $available = $this->storage->config->data;
     if (!is_array($required_modules)) {
         $required_modules = array($required_modules);
     }
     foreach ($removals as $indx => $remove) {
         if (isset($available->{$remove})) {
             // I found the thing I thought I might need to remove
             // someplace else.
             unset($removals[$indx]);
             $this->moved[$remove] = true;
             $updates[] = $remove;
         }
     }
     foreach ($updates as $indx => $update) {
         // make sure our desired updates are really available
         if (!isset($available->{$update})) {
             I2CE::raiseError("Desired update {$update} cannot be found. Instead it is being removed");
             I2CE::raiseError(implode(',', $available->getKeys()));
             $removals[] = $update;
             unset($updates[$indx]);
         }
     }
     // this now holds everything that needs to be disabled or removed
     $removals = array_merge($disables, $removals);
     $tmp_removals = array();
     $avails = $available->getKeys();
     while (count($removals) > 0) {
         $r = array_pop($removals);
         if (!is_scalar($r)) {
             I2CE::raiseError("Internal misconfiguration on removals", E_USER_ERROR);
             continue;
         }
         if (array_key_exists($r, $tmp_removals) && $tmp_removals[$r]) {
             continue;
         }
         /*
//.........這裏部分代碼省略.........
開發者ID:apelon-ohie,項目名稱:ihris-site,代碼行數:101,代碼來源:I2CE_Configurator.php


注:本文中的I2CE::resetFileSearch方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。