AbstractPhpMember extends AbstractModel implements DocblockInterface Uses DocblockPart, LongDescriptionPart, NamePart, TypePart
Abstract PHP member class.
Tags
Interfaces, Classes and Traits
- DocblockInterface
- Docblock interface to represent models that have a docblock.
Table of Contents
- VISIBILITY_PRIVATE = 'private'
- Private visibility.
- VISIBILITY_PROTECTED = 'protected'
- Protected visibility.
- VISIBILITY_PUBLIC = 'public'
- Public visibility.
- $description : string
- $docblock : Docblock
- $longDescription : string
- $name : string
- $parent : AbstractPhpStruct|null
- $static : bool
- $type : string
- $typeDescription : string
- $visibility : string
- __construct() : mixed
- Creates a new member.
- getDescription() : string
- Returns this description.
- getDocblock() : Docblock
- Returns the docblock.
- getLongDescription() : string
- Returns the long description.
- getName() : string
- Returns the name.
- getType() : string
- Returns the type.
- getTypeDescription() : string
- Returns the type description.
- getVisibility() : string
- Returns the visibility state of this member.
- isStatic() : bool
- Returns whether this member is static.
- setDescription() : $this
- Sets the description, which will also be used when generating a docblock.
- setDocblock() : $this
- Sets the docblock.
- setLongDescription() : $this
- Sets the long description.
- setMultilineDescription() : $this
- Sets a multi-line description, which will also be used when generating a docblock.
- setName() : $this
- Sets the name.
- setStatic() : $this
- Sets whether or not this member is static.
- setType() : $this
- Sets the type.
- setTypeDescription() : $this
- Sets the description for the type.
- setVisibility() : $this
- Sets the members visibility.
Constants
VISIBILITY_PRIVATE
Private visibility.
public
string
VISIBILITY_PRIVATE
= 'private'
VISIBILITY_PROTECTED
Protected visibility.
public
string
VISIBILITY_PROTECTED
= 'protected'
VISIBILITY_PUBLIC
Public visibility.
public
string
VISIBILITY_PUBLIC
= 'public'
Properties
$description
protected
string
$description
= ''
$docblock
private
Docblock
$docblock
$longDescription
private
string
$longDescription
= ''
$name
private
string
$name
= ''
$parent
private
AbstractPhpStruct|null
$parent
$static
private
bool
$static
= false
$type
private
string
$type
= ''
$typeDescription
private
string
$typeDescription
= ''
$visibility
private
string
$visibility
= self::VISIBILITY_PUBLIC
Methods
__construct()
Creates a new member.
public
__construct([string $name = '' ]) : mixed
Parameters
- $name : string = ''
-
the name of the member
Return values
mixed —getDescription()
Returns this description.
public
getDescription() : string
Return values
string —getDocblock()
Returns the docblock.
public
getDocblock() : Docblock
Return values
Docblock —getLongDescription()
Returns the long description.
public
getLongDescription() : string
Return values
string —getName()
Returns the name.
public
getName() : string
Return values
string —getType()
Returns the type.
public
getType() : string
Return values
string —getTypeDescription()
Returns the type description.
public
getTypeDescription() : string
Return values
string —getVisibility()
Returns the visibility state of this member.
public
getVisibility() : string
Return values
string —the visibility
isStatic()
Returns whether this member is static.
public
isStatic() : bool
Return values
bool —true
if static and false
if not
setDescription()
Sets the description, which will also be used when generating a docblock.
public
setDescription(string $description) : $this
Parameters
- $description : string
Return values
$this —setDocblock()
Sets the docblock.
public
setDocblock(Docblock|string $doc) : $this
Parameters
- $doc : Docblock|string
Return values
$this —setLongDescription()
Sets the long description.
public
setLongDescription(string $longDescription) : $this
Parameters
- $longDescription : string
Return values
$this —setMultilineDescription()
Sets a multi-line description, which will also be used when generating a docblock.
public
setMultilineDescription(array<string|int, mixed> $description) : $this
Each line is a value of the $description
array.
Parameters
- $description : array<string|int, mixed>
Return values
$this —setName()
Sets the name.
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$this —setStatic()
Sets whether or not this member is static.
public
setStatic(bool $bool) : $this
Parameters
- $bool : bool
Return values
$this —setType()
Sets the type.
public
setType(string $type[, string $description = '' ]) : $this
Parameters
- $type : string
- $description : string = ''
Return values
$this —setTypeDescription()
Sets the description for the type.
public
setTypeDescription(string $description) : $this
Parameters
- $description : string
Return values
$this —setVisibility()
Sets the members visibility.
public
setVisibility(string $visibility) : $this
Parameters
- $visibility : string
-
the new visibility