PHP Класс PAGI\Node\NodeController

Автор: Marcelo Gornstein ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$client PAGI\Client\IClient The PAGI client in use.
$logger PAGI\Logger\Asterisk\IAsteriskLogger Asterisk logger instance to use.
$nodeResults NodeActionCommand[] All registered node results.
$nodes Node[] All registered nodes.

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

Метод Описание
jumpTo ( string $name ) : void Runs a node and process the result.
register ( string $name ) : Node Registers a new node in the application. Returns the created node.
registerResult ( string $name ) : NodeActionCommand Registers a new node result to be taken into account when the given node is ran.
setAgiClient ( PAGI\Client\IClient $client ) : NodeController Sets the pagi client to use by this node.
setName ( string $name ) : Node Gives a name for this node.

Защищенные методы

Метод Описание
logDebug ( string $msg ) : void Used internally to log debug messages
processNodeResult ( Node $node ) : string | false Process the result of the given node. Returns false if no other nodes should be run, or a string with the next node name.

Описание методов

jumpTo() публичный Метод

Runs a node and process the result.
public jumpTo ( string $name ) : void
$name string Node to run.
Результат void

logDebug() защищенный Метод

Used internally to log debug messages
protected logDebug ( string $msg ) : void
$msg string
Результат void

processNodeResult() защищенный Метод

Process the result of the given node. Returns false if no other nodes should be run, or a string with the next node name.
protected processNodeResult ( Node $node ) : string | false
$node Node Node that was run.
Результат string | false

register() публичный Метод

Registers a new node in the application. Returns the created node.
public register ( string $name ) : Node
$name string The node to be registered
Результат Node

registerResult() публичный Метод

Registers a new node result to be taken into account when the given node is ran.
public registerResult ( string $name ) : NodeActionCommand
$name string
Результат NodeActionCommand

setAgiClient() публичный Метод

Sets the pagi client to use by this node.
public setAgiClient ( PAGI\Client\IClient $client ) : NodeController
$client PAGI\Client\IClient
Результат NodeController

setName() публичный Метод

Gives a name for this node.
public setName ( string $name ) : Node
$name string
Результат Node

Описание свойств

$client защищенное свойство

The PAGI client in use.
protected IClient,PAGI\Client $client
Результат PAGI\Client\IClient

$logger защищенное свойство

Asterisk logger instance to use.
protected IAsteriskLogger,PAGI\Logger\Asterisk $logger
Результат PAGI\Logger\Asterisk\IAsteriskLogger

$nodeResults защищенное свойство

All registered node results.
protected NodeActionCommand[],PAGI\Node $nodeResults
Результат NodeActionCommand[]

$nodes защищенное свойство

All registered nodes.
protected Node[],PAGI\Node $nodes
Результат Node[]