PHP 인터페이스 gossi\codegen\model\TraitsInterface

저자: Thomas Gossmann
파일 보기 프로젝트 열기: gossi/php-code-generator 0 사용 예제들

공개 메소드들

메소드 설명
addTrait ( PhpTrait | string $trait ) Adds a trait.
getTraits ( ) : string[] Returns a collection of traits
hasTrait ( PhpTrait | string $trait ) : boolean Checks whether a trait exists
removeTrait ( PhpTrait | string $trait ) Removes a trait.
setTraits ( array $traits ) Sets a collection of traits

메소드 상세

addTrait() 공개 메소드

If the trait is passed as PhpTrait object, the trait is also added as use statement.
public addTrait ( PhpTrait | string $trait )
$trait PhpTrait | string trait or qualified name

getTraits() 공개 메소드

Returns a collection of traits
public getTraits ( ) : string[]
리턴 string[]

hasTrait() 공개 메소드

Checks whether a trait exists
public hasTrait ( PhpTrait | string $trait ) : boolean
$trait PhpTrait | string
리턴 boolean `true` if it exists and `false` if not

removeTrait() 공개 메소드

If the trait is passed as PhpTrait object, the trait is also removed from use statements.
public removeTrait ( PhpTrait | string $trait )
$trait PhpTrait | string trait or qualified name

setTraits() 공개 메소드

Sets a collection of traits
public setTraits ( array $traits )
$traits array