예제 #1
0
 /**
  * Register all legacy factories and all types defined via the legacy array as a factory.
  *
  * @param CreateAttributeFactoryEvent $event The event.
  *
  * @return void
  *
  * @deprecated This method is part of the backwards compatible layer.
  *
  * @SuppressWarnings(PHPMD.Superglobals)
  * @SuppressWarnings(PHPMD.CamelCaseVariableName)
  */
 public static function registerLegacyAttributeFactoryEvents(CreateAttributeFactoryEvent $event)
 {
     if (empty($GLOBALS['METAMODELS']['attributes'])) {
         return;
     }
     $factory = $event->getFactory();
     foreach ($GLOBALS['METAMODELS']['attributes'] as $typeName => $attributeInformation) {
         $typeFactory = LegacyAttributeTypeFactory::createLegacyFactory($typeName, $attributeInformation);
         $factory->addTypeFactory($typeFactory);
     }
 }
 /**
  * Register all legacy factories and all types defined via the legacy array as a factory.
  *
  * @param CreateAttributeFactoryEvent $event The event.
  *
  * @return void
  */
 public static function registerLegacyAttributeFactoryEvents(CreateAttributeFactoryEvent $event)
 {
     $factory = $event->getFactory();
     $factory->addTypeFactory(new static());
 }