protected function doProcess() { if ($this->configClass['is_embedded']) { return; } /* * Definitions. */ $this->definitions['form'] = $definition = new Definition($this->class . 'Form'); $definition->setParentClass('Base' . $this->class . 'Form'); $definition->setDocComment(<<<EOF /** * {$this->class} Form. */ EOF ); $this->definitions['form_base'] = $definition = new Definition('Base' . $this->class . 'Form'); $definition->setParentClass('BaseFormMondongo'); $definition->setDocComment(<<<EOF /** * {$this->class} Base Form. */ EOF ); /* * Outputs. */ $this->outputs['form'] = new Output($this->getOption('output')); $this->outputs['form_base'] = new Output($this->getOption('output') . '/Base', true); /* * Process. */ $this->processSetupMethod(); $this->processGetModelNameMethod(); /* * Plugins. */ if (isset($this->configClass['plugin_name']) && isset($this->configClass['plugin_dir'])) { // definitions $this->definitions['form']->setParentClass('Plugin' . $this->class . 'Form'); $this->definitions['form_plugin'] = $definition = new Definition('Plugin' . $this->class . 'Form'); $definition->setParentClass('Base' . $this->class . 'Form'); $definition->setDocComment(<<<EOF /** * {$this->class} Plugin Form. */ EOF ); // outputs $this->outputs['form']->setDir($this->outputs['form']->getDir() . '/' . $this->configClass['plugin_name']); $this->outputs['form_base']->setDir($this->outputs['form']->getDir() . '/Base'); $this->outputs['form_plugin'] = new Output($this->configClass['plugin_dir'] . '/lib/model/form'); } }
protected function doProcess() { if (isset($this->configClass['plugin_name']) && isset($this->configClass['plugin_dir'])) { /* * Document. */ // definitions $this->definitions['document']->setParentClass('Plugin' . $this->class); $this->definitions['document_plugin'] = $definition = new Definition('Plugin' . $this->class); $definition->setParentClass('Base' . $this->class); $definition->setIsAbstract(true); $definition->setDocComment(<<<EOF /** * {$this->class} Plugin Document. */ EOF ); // outputs $this->outputs['document']->setDir($this->outputs['document']->getDir() . '/' . $this->configClass['plugin_name']); $this->outputs['document_base']->setDir($this->outputs['document']->getDir() . '/Base'); $this->outputs['document_plugin'] = new Output($this->configClass['plugin_dir'] . '/lib/model/mondongo'); /* * Repository. */ // definitions $this->definitions['repository']->setParentClass('Plugin' . $this->class . 'Repository'); $this->definitions['repository_plugin'] = $definition = new Definition('Plugin' . $this->class . 'Repository'); $definition->setParentClass('Base' . $this->class . 'Repository'); $definition->setIsAbstract(true); $definition->setDocComment(<<<EOF /** * {$this->class} Plugin Repository. */ EOF ); // outputs $this->outputs['repository']->setDir($this->outputs['repository']->getDir() . '/' . $this->configClass['plugin_name']); $this->outputs['repository_base']->setDir($this->outputs['repository']->getDir() . '/Base'); $this->outputs['repository_plugin'] = new Output($this->configClass['plugin_dir'] . '/lib/model/mondongo'); } }