/** * Maps annotations * * @param php.ReflectionProperty $reflect * @return [:var] */ protected function fieldAnnotations($reflect) { $details = XPClass::detailsForField($reflect->getDeclaringClass(), $reflect->name); return isset($details[DETAIL_ANNOTATIONS]) ? $this->annotationsOf($details[DETAIL_ANNOTATIONS]) : null; }
/** * Retrieve all of this field's annotations * * @return array annotations */ public function getAnnotations() { $details = \lang\XPClass::detailsForField($this->_reflect->getDeclaringClass()->getName(), $this->_reflect->getName()); return $details ? $details[DETAIL_ANNOTATIONS] : []; }