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

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

공개 메소드들

메소드 설명
addInterface ( PhpInterface | string $interface ) Adds an interface.
addUseStatement ( string $qualifiedName, null | string $alias = null ) Adds a use statement with an optional alias
getInterfaces ( ) : phootwork\collection\Set Returns the interfaces
getNamespace ( ) : string Returns the namespace
hasInterface ( PhpInterface | string $interface ) : boolean Checks whether an interface exists
hasInterfaces ( ) : boolean Checks whether interfaces exists
removeInterface ( PhpInterface | string $interface ) Removes an interface.
removeUseStatement ( string $qualifiedName ) Removes a use statement
setInterfaces ( array $interfaces ) Sets a collection of interfaces

비공개 메소드들

메소드 설명
initInterfaces ( )

메소드 상세

addInterface() 공개 메소드

If the interface is passed as PhpInterface object, the interface is also added as use statement.
public addInterface ( PhpInterface | string $interface )
$interface gossi\codegen\model\PhpInterface | string interface or qualified name

addUseStatement() 추상적인 공개 메소드

Adds a use statement with an optional alias
abstract public addUseStatement ( string $qualifiedName, null | string $alias = null )
$qualifiedName string
$alias null | string

getInterfaces() 공개 메소드

Returns the interfaces
public getInterfaces ( ) : phootwork\collection\Set
리턴 phootwork\collection\Set

getNamespace() 추상적인 공개 메소드

Returns the namespace
abstract public getNamespace ( ) : string
리턴 string

hasInterface() 공개 메소드

Checks whether an interface exists
public hasInterface ( PhpInterface | string $interface ) : boolean
$interface gossi\codegen\model\PhpInterface | string interface name or instance
리턴 boolean

hasInterfaces() 공개 메소드

Checks whether interfaces exists
public hasInterfaces ( ) : boolean
리턴 boolean `true` if interfaces are available and `false` if not

removeInterface() 공개 메소드

If the interface is passed as PhpInterface object, the interface is also remove from the use statements.
public removeInterface ( PhpInterface | string $interface )
$interface gossi\codegen\model\PhpInterface | string interface or qualified name

removeUseStatement() 추상적인 공개 메소드

Removes a use statement
abstract public removeUseStatement ( string $qualifiedName )
$qualifiedName string

setInterfaces() 공개 메소드

Sets a collection of interfaces
public setInterfaces ( array $interfaces )
$interfaces array