Beispiel #1
0
 /**
  * Retrieve all of a method's annotations
  *
  * @return  array annotations
  */
 public function getAnnotations()
 {
     $details = \lang\XPClass::detailsForMethod($this->_reflect->getDeclaringClass()->getName(), $this->_reflect->getName());
     return $details ? $details[DETAIL_ANNOTATIONS] : [];
 }
Beispiel #2
0
 /**
  * Retrieve all of a method's annotations
  *
  * @return  var[] annotations
  */
 public function getAnnotations()
 {
     $n = '$' . $this->_reflect->getName();
     if (!($details = \lang\XPClass::detailsForMethod($this->_details[0], $this->_details[1])) || !isset($details[DETAIL_TARGET_ANNO][$n])) {
         // Unknown or unparseable
         return [];
     }
     return $details[DETAIL_TARGET_ANNO][$n];
 }
 /**
  * Maps annotations
  *
  * @param  php.ReflectionMethod $reflect
  * @return [:var]
  */
 protected function methodAnnotations($reflect)
 {
     $details = XPClass::detailsForMethod($reflect->getDeclaringClass(), $reflect->name);
     return isset($details[DETAIL_ANNOTATIONS]) ? $this->annotationsOf($details[DETAIL_ANNOTATIONS]) : null;
 }