PHP 클래스 phpDocumentor\Reflection\DocBlock

저자: Mike van Riel ([email protected])
상속: implements Reflector
파일 보기 프로젝트 열기: explodybits/hookr-plugin 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$context Information about the context of this DocBlock.
$location Information about the location of this DocBlock.
$long_description The actual description for this docblock.
$short_description The opening line for this docblock.
$tags An array containing all the tags in this docblock; except inline.

공개 메소드들

메소드 설명
__construct ( Reflector | string $docblock, phpDocumentor\Reflection\DocBlock\Context $context = null, phpDocumentor\Reflection\DocBlock\Location $location = null ) Parses the given docblock and populates the member fields.
__toString ( ) : string Returns the exported information (we should use the export static method BUT this throws an exception at this point).
appendTag ( Tag $tag ) : Tag Appends a tag at the end of the list of tags.
export ( ) : string Builds a string representation of this object.
getContext ( ) : phpDocumentor\Reflection\DocBlock\Context Returns the current context.
getLocation ( ) : phpDocumentor\Reflection\DocBlock\Location Returns the current location.
getLongDescription ( ) : Description Returns the full description or also known as long description.
getShortDescription ( ) : string Returns the opening line or also known as short description.
getTags ( ) : Tag[] Returns the tags for this DocBlock.
getTagsByName ( string $name ) : Tag[] Returns an array of tags matching the given name. If no tags are found an empty array is returned.
hasTag ( string $name ) : boolean Checks if a tag of a certain type is present in this DocBlock.

보호된 메소드들

메소드 설명
cleanInput ( string $comment ) : string Strips the asterisks from the DocBlock comment.
parseTags ( string $tags ) : void Creates the tag objects.
splitDocBlock ( string $comment ) : string[] Splits the DocBlock into a short description, long description and block of tags.

메소드 상세

__construct() 공개 메소드

The constructor may also receive namespace information such as the current namespace and aliases. This information is used by some tags (e.g. @return, @param, etc.) to turn a relative Type into a FQCN.
public __construct ( Reflector | string $docblock, phpDocumentor\Reflection\DocBlock\Context $context = null, phpDocumentor\Reflection\DocBlock\Location $location = null )
$docblock Reflector | string A docblock comment (including asterisks) or reflector supporting the getDocComment method.
$context phpDocumentor\Reflection\DocBlock\Context The context in which the DocBlock occurs.
$location phpDocumentor\Reflection\DocBlock\Location The location within the file that this DocBlock occurs in.

__toString() 공개 메소드

Returns the exported information (we should use the export static method BUT this throws an exception at this point).
public __toString ( ) : string
리턴 string

appendTag() 공개 메소드

Appends a tag at the end of the list of tags.
public appendTag ( Tag $tag ) : Tag
$tag phpDocumentor\Reflection\DocBlock\Tag The tag to add.
리턴 phpDocumentor\Reflection\DocBlock\Tag The newly added tag.

cleanInput() 보호된 메소드

Strips the asterisks from the DocBlock comment.
protected cleanInput ( string $comment ) : string
$comment string String containing the comment text.
리턴 string

export() 공개 정적인 메소드

Builds a string representation of this object.
public static export ( ) : string
리턴 string

getContext() 공개 메소드

Returns the current context.
public getContext ( ) : phpDocumentor\Reflection\DocBlock\Context
리턴 phpDocumentor\Reflection\DocBlock\Context

getLocation() 공개 메소드

Returns the current location.
public getLocation ( ) : phpDocumentor\Reflection\DocBlock\Location
리턴 phpDocumentor\Reflection\DocBlock\Location

getLongDescription() 공개 메소드

Returns the full description or also known as long description.
public getLongDescription ( ) : Description
리턴 phpDocumentor\Reflection\DocBlock\Description

getShortDescription() 공개 메소드

Returns the opening line or also known as short description.
public getShortDescription ( ) : string
리턴 string

getTags() 공개 메소드

Returns the tags for this DocBlock.
public getTags ( ) : Tag[]
리턴 phpDocumentor\Reflection\DocBlock\Tag[]

getTagsByName() 공개 메소드

Returns an array of tags matching the given name. If no tags are found an empty array is returned.
public getTagsByName ( string $name ) : Tag[]
$name string String to search by.
리턴 phpDocumentor\Reflection\DocBlock\Tag[]

hasTag() 공개 메소드

Checks if a tag of a certain type is present in this DocBlock.
public hasTag ( string $name ) : boolean
$name string Tag name to check for.
리턴 boolean

parseTags() 보호된 메소드

Creates the tag objects.
protected parseTags ( string $tags ) : void
$tags string Tag block to parse.
리턴 void

splitDocBlock() 보호된 메소드

Splits the DocBlock into a short description, long description and block of tags.
저자: RichardJ Special thanks to RichardJ for the regex responsible for the split.
protected splitDocBlock ( string $comment ) : string[]
$comment string Comment to split into the sub-parts.
리턴 string[] containing the short-, long description and an element containing the tags.

프로퍼티 상세

$context 보호되어 있는 프로퍼티

Information about the context of this DocBlock.
protected $context

$location 보호되어 있는 프로퍼티

Information about the location of this DocBlock.
protected $location

$long_description 보호되어 있는 프로퍼티

The actual description for this docblock.
protected $long_description

$short_description 보호되어 있는 프로퍼티

The opening line for this docblock.
protected $short_description

$tags 보호되어 있는 프로퍼티

An array containing all the tags in this docblock; except inline.
protected $tags