Psr2 Code Generator

PropertiesInterface

Table of Contents

clearProperties()  : $this
Clears all properties.
getProperties()  : Map
Returns a collection of properties.
getProperty()  : PhpProperty
Returns a property.
getPropertyNames()  : Set
Returns all property names.
hasProperty()  : bool
Checks whether a property exists.
hasPropertyByName()  : bool
Checks whether a property exists.
removeProperty()  : $this
Removes a property.
removePropertyByName()  : $this
Removes a property by its name.
setProperties()  : $this
Sets a collection of properties.
setProperty()  : $this
Adds a property.

Methods

clearProperties()

Clears all properties.

public clearProperties() : $this
Return values
$this

getProperties()

Returns a collection of properties.

public getProperties() : Map
Return values
Map

getProperty()

Returns a property.

public getProperty(string $name) : PhpProperty
Parameters
$name : string

property name

Tags
throws
InvalidArgumentException

If the property cannot be found

Return values
PhpProperty

getPropertyNames()

Returns all property names.

public getPropertyNames() : Set
Return values
Set

hasProperty()

Checks whether a property exists.

public hasProperty(PhpProperty $property) : bool
Parameters
$property : PhpProperty
Return values
bool

true if a property exists and false if not

hasPropertyByName()

Checks whether a property exists.

public hasPropertyByName(string $name) : bool
Parameters
$name : string

property name

Return values
bool

true if a property exists and false if not

removeProperty()

Removes a property.

public removeProperty(PhpProperty $property) : $this
Parameters
$property : PhpProperty

property instance

Tags
throws
InvalidArgumentException

If the property cannot be found

Return values
$this

removePropertyByName()

Removes a property by its name.

public removePropertyByName(string $name) : $this
Parameters
$name : string

property instance

Tags
throws
InvalidArgumentException

If the property cannot be found

Return values
$this

setProperties()

Sets a collection of properties.

public setProperties(array<string|int, PhpProperty$properties) : $this
Parameters
$properties : array<string|int, PhpProperty>
Return values
$this

Search results