コード例 #1
0
 protected function expandAggregateNamespaces(Schema\FieldDefinition $field_definition)
 {
     foreach ($field_definition->getOptions() as $option) {
         if ($option->getName() === 'modules') {
             foreach ($option->getValue() as $module_option) {
                 $module_option->setValue(sprintf('\\%s\\%s\\%s', $this->buildNamespace(), parent::buildPackage(), $module_option->getValue() . 'Module'));
             }
         }
     }
 }
コード例 #2
0
ファイル: Service.php プロジェクト: berlinonline/dat0r
 protected function createClassBuilders(Schema\ModuleSchema $module_schema)
 {
     $create_builders = function (Schema\ModuleDefinition $module) use($module_schema) {
         return array(Builder\ModuleBaseClass::create($module_schema, $module), Builder\ModuleClass::create($module_schema, $module), Builder\DocumentBaseClass::create($module_schema, $module), Builder\DocumentClass::create($module_schema, $module));
     };
     $root_module = $module_schema->getModuleDefinition();
     $class_builders = $create_builders($root_module);
     foreach ($module_schema->getUsedAggregateDefinitions($root_module) as $aggregate_module) {
         $class_builders = array_merge($class_builders, $create_builders($aggregate_module));
     }
     return $class_builders;
 }