public function hasAnnotation($name)
    {
        $result = false;

        if (!string_ends_with($name, 'Annotation')) $name .= 'Annotation';

        foreach ($this->annotations as $annotation)
        {
            $class = get_class($annotation);

            if (string_starts_with($class, "\\") && !string_starts_with($name, "\\"))
                $name = "\\" . $name;
            elseif (!string_starts_with($class, "\\") && string_starts_with($name, "\\"))
                $name = substr($name, 1);

            if (string_ends_with($class, $name))
            {
                $result = true;
                break;
            }
        }

        return $result;
    }
public function hasAnnotation($name)
    {
        $result = false;

        if (!string_ends_with($name, 'Annotation')) $name .= 'Annotation';

        foreach ($this->annotations as $annotation)
        {
            $class = get_class($annotation);

            if (string_starts_with($class, "\\") && !string_starts_with($name, "\\"))
                $name = "\\" . $name;
            elseif (!string_starts_with($class, "\\") && string_starts_with($name, "\\"))
                $name = substr($name, 1);

            if (string_ends_with($class, $name))
            {
                $result = true;
                break;
            }
        }

        return $result;
    }
public function hasAnnotation ( $ name ) { $ result = false ; if ( ! string_ends_with ( $ name , 'Annotation' ) ) $ name .= 'Annotation' ; foreach ( $ this -> annotations as $ annotation ) { $ class = get_class ( $ annotation ) ; if ( string_starts_with ( $ class , "\\" ) && ! string_starts_with ( $ name , "\\" ) ) $ name = "\\" . $ name ; elseif ( ! string_starts_with ( $ class , "\\" ) && string_starts_with ( $ name , "\\" ) ) $ name = substr ( $ name , 1 ) ; if ( string_ends_with ( $ class , $ name ) ) { $ result = true ; break ; } } return $ result ; }
Tells if the reflection object has the given annotation or not.
@param string $name
@return bool
Tells if the reflection object has the given annotation or not .