/** * Return templates list * * @return array */ protected function getAnnotatedTemplates() { if (!isset(static::$annotatedTemplates)) { static::$annotatedTemplates = array(); static::$inheritedTemplates = array(); foreach ($this->getTemplateFileIterator()->getIterator() as $path => $data) { $data = \Includes\Decorator\Utils\Operator::getTags(\Includes\Utils\FileManager::read($path, true), array(static::TAG_LIST_CHILD, static::TAG_INHERITED_LIST_CHILD)); if (isset($data[static::TAG_LIST_CHILD])) { $this->addTags($data[static::TAG_LIST_CHILD], $path); } if (isset($data[static::TAG_INHERITED_LIST_CHILD])) { static::$inheritedTemplates[] = $path; } } } return static::$annotatedTemplates; }
/** * Return modules graph * * @return \Includes\Decorator\DataStructure\Graph\Modules */ public static function getModulesGraph() { if (!isset(static::$modulesGraph)) { static::$modulesGraph = \Includes\Decorator\Utils\Operator::createModulesGraph(); } return static::$modulesGraph; }
/** * Parse and return all tags * * @param boolean $forceTokenizer Flag to force tokenizer use (since LC_Dependencies classes could be non-working) * * @return array */ public function getTags($forceTokenizer = false) { if (!isset($this->tags)) { $this->tags = \Includes\Decorator\Utils\Operator::getTags($this->getReflection($forceTokenizer)->docComment); if (!empty($this->tags['lc_dependencies'][0])) { $this->tags['lc_dependencies'] = \Includes\Utils\Converter::parseQuery($this->tags['lc_dependencies'][0], null, ',', '"\'', false); } } return $this->tags; }
/** * Correct (if needed) class doc block comment. Works for one element from the queue * * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node * * @return void */ protected function correctTagsOnElement(\Includes\Decorator\DataStructure\Graph\Classes $node) { \Includes\Utils\FileManager::replace(\Includes\Decorator\ADecorator::getCacheClassesDir() . $node->getPath(), '@$1 ' . $this->getRepositoryCustomClassParameter($node), \Includes\Decorator\Utils\Operator::getTagPattern(array('Entity', 'MappedSuperClass'))); }