PHP 트레잇 gossi\codegen\model\parts\ConstantsPart

For all models that can contain constants
저자: Thomas Gossmann
파일 보기 프로젝트 열기: gossi/php-code-generator

공개 메소드들

메소드 설명
clearConstants ( ) Clears all constants
getConstant ( string | PhpConstant $nameOrConstant ) : PhpConstant Returns a constant.
getConstantNames ( ) : phootwork\collection\Set Returns all constant names
getConstants ( ) : phootwork\collection\Map Returns all constants
hasConstant ( string | PhpConstant $nameOrConstant ) : boolean Checks whether a constant exists
removeConstant ( string | PhpConstant $nameOrConstant ) Removes a constant
setConstant ( string | PhpConstant $nameOrConstant, string $value = null, $isExpression = false ) Adds a constant
setConstants ( array $constants ) Sets a collection of constants

비공개 메소드들

메소드 설명
initConstants ( )

메소드 상세

clearConstants() 공개 메소드

Clears all constants
public clearConstants ( )

getConstant() 공개 메소드

Returns a constant.
public getConstant ( string | PhpConstant $nameOrConstant ) : PhpConstant
$nameOrConstant string | gossi\codegen\model\PhpConstant
리턴 gossi\codegen\model\PhpConstant

getConstantNames() 공개 메소드

Returns all constant names
public getConstantNames ( ) : phootwork\collection\Set
리턴 phootwork\collection\Set

getConstants() 공개 메소드

Returns all constants
public getConstants ( ) : phootwork\collection\Map
리턴 phootwork\collection\Map

hasConstant() 공개 메소드

Checks whether a constant exists
public hasConstant ( string | PhpConstant $nameOrConstant ) : boolean
$nameOrConstant string | gossi\codegen\model\PhpConstant
리턴 boolean

removeConstant() 공개 메소드

Removes a constant
public removeConstant ( string | PhpConstant $nameOrConstant )
$nameOrConstant string | gossi\codegen\model\PhpConstant constant name

setConstant() 공개 메소드

Adds a constant
public setConstant ( string | PhpConstant $nameOrConstant, string $value = null, $isExpression = false )
$nameOrConstant string | gossi\codegen\model\PhpConstant constant name or instance
$value string

setConstants() 공개 메소드

Sets a collection of constants
public setConstants ( array $constants )
$constants array