public function getAnnotationsByType($type) { $annotations = array(); foreach ($this->annotations as $an) { if ($an->getName() == $type) { $annotations[] = $an; } } return $annotations; }