PHP Трейт gossi\codegen\model\parts\InterfacesPart

For all models that can contain interfaces
Автор: Thomas Gossmann
Показать файл Открыть проект

Открытые методы

Метод Описание
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