class AbstractPhpMember extends AbstractModel implements DocblockInterface

Abstract PHP member class.

Traits

Docblock Part
Long description part
Name part
Type part

Constants

VISIBILITY_PRIVATE

Private visibility

VISIBILITY_PROTECTED

Protected visibility

VISIBILITY_PUBLIC

Public visibility

Methods

$this
setAttribute(string $key, mixed $value) deprecated

Sets a custom user attribute

mixed
removeAttribute(string $key) deprecated

Removes and returns a custom user attribute

mixed
getAttribute(string $key) deprecated

Returns a custom user attribute

mixed
getAttributeOrElse(string $key, mixed $default) deprecated

Returns a custom user attribute or the default value if the attribute doesn't exist

bool
hasAttribute(string $key) deprecated

Checks whether an attribute exists

$this
setAttributes(array $attrs) deprecated

Sets custom user attributes

array
getAttributes() deprecated

Returns all custom user attributes

string
getDescription()

Returns this description

$this
setDescription(string|array $description)

Sets the description, which will also be used when generating a docblock

$this
setDocblock(Docblock|string $doc)

Sets the docblock

Docblock
getDocblock()

Returns the docblock

string
getLongDescription()

Returns the long description

$this
setLongDescription(string $longDescription)

Sets the long description

$this
setName(string $name)

Sets the name

from NamePart
string
getName()

Returns the name

from NamePart
$this
setType(string $type, string $description = null)

Sets the type

from TypePart
$this
setTypeDescription(string $description)

Sets the description for the type

from TypePart
string
getType()

Returns the type

from TypePart
string
getTypeDescription()

Returns the type description

from TypePart
__construct(string $name)

Creates a new member

$this
setVisibility(string $visibility)

Sets the members visibility

string
getVisibility()

Returns the visibility state of this member

$this
setStatic(bool $bool)

Sets whether or not this member is static

bool
isStatic()

Returns whether this member is static

$this
setParent(AbstractPhpStruct|null $parent)

Sets the parent structure to which this member belongs

getParent()

Returns the parent structure to which this member belongs

Details

in AbstractModel at line line 25
$this setAttribute(string $key, mixed $value) deprecated

deprecated See: https://github.com/gossi/php-code-generator/issues/29

Sets a custom user attribute

Parameters

string $key
mixed $value

Return Value

$this

in AbstractModel at line line 38
mixed removeAttribute(string $key) deprecated

deprecated See: https://github.com/gossi/php-code-generator/issues/29

Removes and returns a custom user attribute

Parameters

string $key

Return Value

mixed

in AbstractModel at line line 52
mixed getAttribute(string $key) deprecated

deprecated See: https://github.com/gossi/php-code-generator/issues/29

Returns a custom user attribute

Parameters

string $key

Return Value

mixed

Exceptions

InvalidArgumentException if the key cannot be found

in AbstractModel at line line 68
mixed getAttributeOrElse(string $key, mixed $default) deprecated

deprecated See: https://github.com/gossi/php-code-generator/issues/29

Returns a custom user attribute or the default value if the attribute doesn't exist

Parameters

string $key
mixed $default

Return Value

mixed

in AbstractModel at line line 83
bool hasAttribute(string $key) deprecated

deprecated See: https://github.com/gossi/php-code-generator/issues/29

Checks whether an attribute exists

Parameters

string $key

Return Value

bool

in AbstractModel at line line 94
$this setAttributes(array $attrs) deprecated

deprecated See: https://github.com/gossi/php-code-generator/issues/29

Sets custom user attributes

Parameters

array $attrs

Return Value

$this

in AbstractModel at line line 106
array getAttributes() deprecated

deprecated See: https://github.com/gossi/php-code-generator/issues/29

Returns all custom user attributes

Return Value

array

in AbstractModel at line line 115
string getDescription()

Returns this description

Return Value

string

in AbstractModel at line line 125
$this setDescription(string|array $description)

Sets the description, which will also be used when generating a docblock

Parameters

string|array $description

Return Value

$this

in DocblockPart at line line 24
$this setDocblock(Docblock|string $doc)

Sets the docblock

Parameters

Docblock|string $doc

Return Value

$this

in DocblockPart at line line 39
Docblock getDocblock()

Returns the docblock

Return Value

Docblock

in LongDescriptionPart at line line 21
string getLongDescription()

Returns the long description

Return Value

string

in LongDescriptionPart at line line 31
$this setLongDescription(string $longDescription)

Sets the long description

Parameters

string $longDescription

Return Value

$this

in NamePart at line line 22
$this setName(string $name)

Sets the name

Parameters

string $name

Return Value

$this

in NamePart at line line 33
string getName()

Returns the name

Return Value

string

in TypePart at line line 26
$this setType(string $type, string $description = null)

Sets the type

Parameters

string $type
string $description

Return Value

$this

in TypePart at line line 41
$this setTypeDescription(string $description)

Sets the description for the type

Parameters

string $description

Return Value

$this

in TypePart at line line 51
string getType()

Returns the type

Return Value

string

in TypePart at line line 60
string getTypeDescription()

Returns the type description

Return Value

string

at line line 73
__construct(string $name)

Creates a new member

Parameters

string $name the name of the member

at line line 87
$this setVisibility(string $visibility)

Sets the members visibility

Parameters

string $visibility the new visibility

Return Value

$this

See also

self::VISIBILITY_PUBLIC
self::VISIBILITY_PROTECTED
self::VISIBILITY_PRIVATE

at line line 104
string getVisibility()

Returns the visibility state of this member

Return Value

string the visibility

at line line 114
$this setStatic(bool $bool)

Sets whether or not this member is static

Parameters

bool $bool

Return Value

$this

at line line 125
bool isStatic()

Returns whether this member is static

Return Value

bool true if static and false if not

at line line 136
$this setParent(AbstractPhpStruct|null $parent)

Sets the parent structure to which this member belongs

Parameters

AbstractPhpStruct|null $parent

Return Value

$this

at line line 147
AbstractPhpStruct getParent()

Returns the parent structure to which this member belongs

Return Value

AbstractPhpStruct