PHP Trait gossi\codegen\model\parts\PropertiesPart

For all models that can have properties
Author: Thomas Gossmann
Datei anzeigen Open project: gossi/php-code-generator

Public Methods

Method Description
clearProperties ( ) Clears all properties
getProperties ( ) : phootwork\collection\Map Returns a collection of properties
getProperty ( string $nameOrProperty ) : PhpProperty Returns a property
getPropertyNames ( ) : Set Returns all property names
hasProperty ( PhpProperty | string $nameOrProperty ) : boolean Checks whether a property exists
removeProperty ( PhpProperty | string $nameOrProperty ) Removes a property
setProperties ( array $properties ) Sets a collection of properties
setProperty ( PhpProperty $property ) Adds a property

Private Methods

Method Description
initProperties ( )

Method Details

clearProperties() public method

Clears all properties
public clearProperties ( )

getProperties() public method

Returns a collection of properties
public getProperties ( ) : phootwork\collection\Map
return phootwork\collection\Map

getProperty() public method

Returns a property
public getProperty ( string $nameOrProperty ) : PhpProperty
$nameOrProperty string property name
return gossi\codegen\model\PhpProperty

getPropertyNames() public method

Returns all property names
public getPropertyNames ( ) : Set
return Set

hasProperty() public method

Checks whether a property exists
public hasProperty ( PhpProperty | string $nameOrProperty ) : boolean
$nameOrProperty gossi\codegen\model\PhpProperty | string property name or instance
return boolean `true` if a property exists and `false` if not

removeProperty() public method

Removes a property
public removeProperty ( PhpProperty | string $nameOrProperty )
$nameOrProperty gossi\codegen\model\PhpProperty | string property name or instance

setProperties() public method

Sets a collection of properties
public setProperties ( array $properties )
$properties array

setProperty() public method

Adds a property
public setProperty ( PhpProperty $property )
$property gossi\codegen\model\PhpProperty