PHP Trait gossi\codegen\model\parts\PropertiesPart

For all models that can have properties
Author: Thomas Gossmann
Afficher le fichier Open project: gossi/php-code-generator

Méthodes publiques

Méthode 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

Méthode Description
initProperties ( )

Method Details

clearProperties() public méthode

Clears all properties
public clearProperties ( )

getProperties() public méthode

Returns a collection of properties
public getProperties ( ) : phootwork\collection\Map
Résultat phootwork\collection\Map

getProperty() public méthode

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

getPropertyNames() public méthode

Returns all property names
public getPropertyNames ( ) : Set
Résultat Set

hasProperty() public méthode

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

removeProperty() public méthode

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

setProperties() public méthode

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

setProperty() public méthode

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