PHP Class PAGI\Application\PAGIApplication

PHP Version 5
Author: Marcelo Gornstein ([email protected])
Afficher le fichier Open project: marcelog/pagi

Protected Properties

Свойство Type Description
$logger Logger PSR-3 logger.

Méthodes publiques

Méthode Description
__construct ( array $properties = [] ) : void Constructor. Will call set_error_handler() and pcntl_signal() to setup your errorHandler() and signalHandler(). Also will call register_shutdown_function() to register your shutdown() function.
errorHandler ( integer $type, string $message, string $file, integer $line ) : boolean Your error handler. Be careful when implementing this one.
init ( ) : void Called to initialize the application
run ( ) : void Called to run the application, after calling init().
setLogger ( Psr\Log\LoggerInterface $logger ) : void Sets the logger implementation.
shutdown ( ) : void Called when PHPvm is shutting down.
signalHandler ( integer $signal ) : void Your signal handler. Be careful when implementing this one.

Méthodes protégées

Méthode Description
getAgi ( ) : PAGI\Client\IClient Returns AGI Client.

Method Details

__construct() public méthode

Constructor. Will call set_error_handler() and pcntl_signal() to setup your errorHandler() and signalHandler(). Also will call register_shutdown_function() to register your shutdown() function.
public __construct ( array $properties = [] ) : void
$properties array Optional additional properties.
Résultat void

errorHandler() abstract public méthode

Your error handler. Be careful when implementing this one.
abstract public errorHandler ( integer $type, string $message, string $file, integer $line ) : boolean
$type integer PHP Error type constant.
$message string Human readable error message string.
$file string File that triggered the error.
$line integer Line that triggered the error.
Résultat boolean

getAgi() protected méthode

Returns AGI Client.
protected getAgi ( ) : PAGI\Client\IClient
Résultat PAGI\Client\IClient

init() abstract public méthode

Called to initialize the application
abstract public init ( ) : void
Résultat void

run() abstract public méthode

Called to run the application, after calling init().
abstract public run ( ) : void
Résultat void

setLogger() public méthode

Sets the logger implementation.
public setLogger ( Psr\Log\LoggerInterface $logger ) : void
$logger Psr\Log\LoggerInterface The PSR3-Logger
Résultat void

shutdown() abstract public méthode

Called when PHPvm is shutting down.
abstract public shutdown ( ) : void
Résultat void

signalHandler() abstract public méthode

Your signal handler. Be careful when implementing this one.
abstract public signalHandler ( integer $signal ) : void
$signal integer Signal catched.
Résultat void

Property Details

$logger protected_oe property

PSR-3 logger.
protected Logger $logger
Résultat Logger