Documentation

Tag
in package

FinalYes

This represents a tag, as defined by the proposed PSR PHPDoc standard.

Tags
author

Graham Campbell hello@gjcampbell.co.uk

author

Jakub Kwaśniewski jakub@zero-85.pl

Table of Contents

Constants

PSR_STANDARD_TAGS  = ['api', 'author', 'category', 'copyright', 'deprecated', 'example', 'global', 'internal', 'license', 'link', 'method', 'package', 'param', 'property', 'property-read', 'property-write', 'return', 'see', 'since', 'subpackage', 'throws', 'todo', 'uses', 'var', 'version']
All the tags defined by the proposed PSR PHPDoc standard.

Properties

$line  : Line
The line containing the tag.
$name  : string|null
The cached tag name.

Methods

__construct()  : mixed
Create a new tag instance.
getName()  : string
Get the tag name.
setName()  : void
Set the tag name.
valid()  : bool
Is the tag a known tag?

Constants

PSR_STANDARD_TAGS

All the tags defined by the proposed PSR PHPDoc standard.

public mixed PSR_STANDARD_TAGS = ['api', 'author', 'category', 'copyright', 'deprecated', 'example', 'global', 'internal', 'license', 'link', 'method', 'package', 'param', 'property', 'property-read', 'property-write', 'return', 'see', 'since', 'subpackage', 'throws', 'todo', 'uses', 'var', 'version']

Properties

$line

The line containing the tag.

private Line $line

$name

The cached tag name.

private string|null $name = null

Methods

__construct()

Create a new tag instance.

public __construct(Line $line) : mixed
Parameters
$line : Line

getName()

Get the tag name.

public getName() : string

This may be "param", or "return", etc.

Return values
string

setName()

Set the tag name.

public setName(string $name) : void

This will also be persisted to the upstream line and annotation.

Parameters
$name : string

valid()

Is the tag a known tag?

public valid() : bool

This is defined by if it exists in the proposed PSR PHPDoc standard.

Return values
bool

        
On this page

Search results