/** * Merge an annotation tag mapper into the current one. * * @param \Wingu\OctopusCore\Reflection\Annotation\TagMapper $tagMapper The annotations tag mapper to merge. * @param boolean $overwrite Flag if the existing found annotations tags should be overwritten. * @return \Wingu\OctopusCore\Reflection\Annotation\TagMapper */ public function mergeTagMapper(TagMapper $tagMapper, $overwrite = true) { if ($overwrite === true) { $this->mappedTags = array_merge($this->mappedTags, $tagMapper->getMappedTags()); } else { $this->mappedTags = array_merge($tagMapper->getMappedTags(), $this->mappedTags); } return $this; }
/** * Get the annotation class to use for an annotation tag. * * @param string $tag The annotation tag name. * @return string */ protected function getAnnotationClass($tag) { if ($this->tagsMapper !== null && $this->tagsMapper->hasMappedTag($tag) === true) { return $this->tagsMapper->getMappedTag($tag); } elseif (class_exists(__NAMESPACE__ . '\\Tags\\' . ucfirst($tag) . 'Tag') === true) { return __NAMESPACE__ . '\\Tags\\' . ucfirst($tag) . 'Tag'; } else { return __NAMESPACE__ . '\\Tags\\BaseTag'; } }