PHP Class PAGI\Node\NodeController

Author: Marcelo Gornstein ([email protected])
Afficher le fichier Open project: marcelog/pagi Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

jumpTo() public méthode

Runs a node and process the result.
public jumpTo ( string $name ) : void
$name string Node to run.
Résultat void

logDebug() protected méthode

Used internally to log debug messages
protected logDebug ( string $msg ) : void
$msg string
Résultat void

processNodeResult() protected méthode

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.
Résultat string | false

register() public méthode

Registers a new node in the application. Returns the created node.
public register ( string $name ) : Node
$name string The node to be registered
Résultat Node

registerResult() public méthode

Registers a new node result to be taken into account when the given node is ran.
public registerResult ( string $name ) : NodeActionCommand
$name string
Résultat NodeActionCommand

setAgiClient() public méthode

Sets the pagi client to use by this node.
public setAgiClient ( PAGI\Client\IClient $client ) : NodeController
$client PAGI\Client\IClient
Résultat NodeController

setName() public méthode

Gives a name for this node.
public setName ( string $name ) : Node
$name string
Résultat Node

Property Details

$client protected_oe property

The PAGI client in use.
protected IClient,PAGI\Client $client
Résultat PAGI\Client\IClient

$logger protected_oe property

Asterisk logger instance to use.
protected IAsteriskLogger,PAGI\Logger\Asterisk $logger
Résultat PAGI\Logger\Asterisk\IAsteriskLogger

$nodeResults protected_oe property

All registered node results.
protected NodeActionCommand[],PAGI\Node $nodeResults
Résultat NodeActionCommand[]

$nodes protected_oe property

All registered nodes.
protected Node[],PAGI\Node $nodes
Résultat Node[]