public function getAnnotation($name)
    {
        $result = null;

        if ($this->hasAnnotationAndReturn($name))
        {
            if (!string_ends_with($name, 'Annotation')) $name .= 'Annotation';

            $result = isset($this->annotations[$name]) ? $this->annotations[$name] : null;

            if ($result == null)
            {
                if (string_starts_with($name, '\\'))
                    $name = substr($name, 1, strlen($name) - 1);
                else
                    $name = '\\' . $name;

                $result = isset($this->annotations[$name]) ? $this->annotations[$name] : null;
            }

            $result = $this->evaluateAnnotation($result);
        }

        return $result;
    }
public function getAnnotation($name)
    {
        $result = null;

        if ($this->hasAnnotationAndReturn($name))
        {
            if (!string_ends_with($name, 'Annotation')) $name .= 'Annotation';

            $result = isset($this->annotations[$name]) ? $this->annotations[$name] : null;

            if ($result == null)
            {
                if (string_starts_with($name, '\\'))
                    $name = substr($name, 1, strlen($name) - 1);
                else
                    $name = '\\' . $name;

                $result = isset($this->annotations[$name]) ? $this->annotations[$name] : null;
            }

            $result = $this->evaluateAnnotation($result);
        }

        return $result;
    }
public function getAnnotation ( $ name ) { $ result = null ; if ( $ this -> hasAnnotationAndReturn ( $ name ) ) { if ( ! string_ends_with ( $ name , 'Annotation' ) ) $ name .= 'Annotation' ; $ result = isset ( $ this -> annotations [ $ name ] ) ? $ this -> annotations [ $ name ] : null ; if ( $ result == null ) { if ( string_starts_with ( $ name , '\\' ) ) $ name = substr ( $ name , 1 , strlen ( $ name ) - 1 ) ; else $ name = '\\' . $ name ; $ result = isset ( $ this -> annotations [ $ name ] ) ? $ this -> annotations [ $ name ] : null ; } $ result = $ this -> evaluateAnnotation ( $ result ) ; } return $ result ; }
Returns the requested annotation.
@param string $name
@return Annotation|null
Returns the requested annotation .