예제 #1
0
파일: Main.php 프로젝트: kingsj/core
 /**
  * Execute certain hook handle
  *
  * @return void
  */
 public function executeHookHandler()
 {
     foreach (\Includes\Decorator\Plugin\Doctrine\Utils\FixturesManager::getFixtures() as $fixture) {
         \XLite\Core\Database::getInstance()->loadFixturesFromYaml($fixture);
     }
     \Includes\Decorator\Plugin\Doctrine\Utils\FixturesManager::removeFixtures();
 }
예제 #2
0
파일: Main.php 프로젝트: kirkbauer2/kirkxc
 /**
  * Execute certain hook handle
  *
  * @return void
  */
 public function executeHookHandler()
 {
     $list = \Includes\Decorator\Plugin\Doctrine\Utils\FixturesManager::getFixtures();
     if ($list) {
         \Includes\Utils\Operator::showMessage('', true, false);
         foreach ($list as $fixture) {
             $message = '...Load ' . substr($fixture, strlen(LC_DIR_ROOT));
             \Includes\Utils\Operator::showMessage($message, true, true);
             \Includes\Decorator\Utils\CacheManager::logMessage(PHP_EOL);
             \Includes\Decorator\Utils\CacheManager::logMessage($message);
             if (static::isYAML($fixture)) {
                 // Load YAML fixture
                 \XLite\Core\Database::getInstance()->loadFixturesFromYaml($fixture);
             } else {
                 // Load SQL queries
                 \Includes\Utils\Database::uploadSQLFromFile($fixture);
             }
             \Includes\Decorator\Plugin\Doctrine\Utils\FixturesManager::removeFixtureFromList($fixture);
             if (\Includes\Decorator\Utils\CacheManager::isTimeExceeds(static::STEP_TTL)) {
                 break;
             }
         }
     }
     \Includes\Decorator\Utils\CacheManager::logMessage(PHP_EOL);
     \XLite\Core\Database::getEM()->clear();
 }
예제 #3
0
파일: Main.php 프로젝트: kirkbauer2/kirkxc
 /**
  * Execute certain hook handle
  *
  * @return void
  */
 public function executeHookHandler()
 {
     // Postprocess step (Load fixtures)
     if (\Includes\Decorator\Plugin\Doctrine\Utils\FixturesManager::getFixtures()) {
         \Includes\Decorator\Utils\CacheManager::$skipStepCompletion = true;
     } else {
         \Includes\Decorator\Plugin\Doctrine\Utils\FixturesManager::removeFixtures();
     }
 }