Exemple #1
0
 /**
  * Execute certain hook handle
  *
  * @return void
  */
 public function executeHookHandler()
 {
     // Postprocess step (UpdateDBSchema)
     if (\Includes\Decorator\Plugin\Doctrine\Utils\DBSchemaManager::getDBSchema()) {
         \Includes\Decorator\Utils\CacheManager::$skipStepCompletion = true;
     } else {
         \Includes\Decorator\Plugin\Doctrine\Utils\DBSchemaManager::removeDBSchema();
     }
 }
Exemple #2
0
 /**
  * Execute certain hook handle
  *
  * @return void
  */
 public function executeHookHandler()
 {
     $this->saveMetadata();
     if (!\Includes\Decorator\Utils\CacheManager::isCapsular() || $this->isMetadataChanged()) {
         \Includes\Decorator\Utils\CacheInfo::set('metadataChangedState', true);
         \Includes\Decorator\Plugin\Doctrine\Utils\DBSchemaManager::prepareDBSchema();
     } else {
         \Includes\Decorator\Utils\CacheInfo::set('metadataChangedState', false);
         \Includes\Decorator\Plugin\Doctrine\Utils\DBSchemaManager::removeDBSchema();
     }
 }
Exemple #3
0
 /**
  * Execute certain hook handle
  *
  * @return void
  */
 public function executeHookHandler()
 {
     $schema = \Includes\Decorator\Plugin\Doctrine\Utils\DBSchemaManager::getDBSchema();
     if ($schema) {
         do {
             $queries = array();
             foreach ($schema as $k => $query) {
                 $queries[] = $query;
                 unset($schema[$k]);
             }
             if ($queries) {
                 \XLite\Core\Database::getInstance()->executeQueries($queries);
             }
         } while ($schema && !\Includes\Decorator\Utils\CacheManager::isTimeExceeds(static::STEP_TTL));
         \Includes\Decorator\Plugin\Doctrine\Utils\DBSchemaManager::updateDBSchema($schema);
     }
 }