PHP Класс Phergie_Ui_Console, phergie

Автор: Phergie Development Team ([email protected])
Наследование: extends Phergie_Ui_Abstract
Показать файл Открыть проект

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

Свойство Тип Описание
$enabled boolean Flag that toggles all console output
$format string Format for timestamps included in console output

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

Метод Описание
__construct ( ) : void Constructor to initialize object properties.
getFormat ( ) : string Returns the format used for timestamps in console output.
isEnabled ( ) : boolean Returns whether console output is enabled.
onCommand ( Phergie_Event_Command $event, Phergie_Connection $connection ) : void Outputs a prompt when the bot sends a command to a server.
onConnect ( string $host ) : void Outputs a prompt when a server connection is attempted.
onEvent ( Phergie_Event_Abstract $event, Phergie_Connection $connection ) : void Outputs a prompt when the bot receives an IRC event.
onPluginFailure ( string $plugin, string $message ) : void Outputs a prompt when a plugin fails to load.
onPluginLoad ( string $plugin ) : void Outputs a prompt when a plugin is loaded successfully.
onQuit ( Phergie_Connection $connection ) : void Outputs a prompt when the bot terminates a connection to a server.
onShutdown ( ) : void Outputs a prompt when the bot shuts down after terminating all server connections.
setEnabled ( boolean $enabled = true ) : Phergie_Ui_Console Sets whether console output is enabled.
setFormat ( string $format ) : Phergie_Ui_Console Sets the format used for timestamps in console output, overwriting any previous format used.

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

Метод Описание
console ( string $line ) : void Outputs a timestamped line to the console if console output is enabled.

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

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

Constructor to initialize object properties.
public __construct ( ) : void
Результат void

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

Outputs a timestamped line to the console if console output is enabled.
protected console ( string $line ) : void
$line string Line to output
Результат void

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

Returns the format used for timestamps in console output.
public getFormat ( ) : string
Результат string

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

Returns whether console output is enabled.
public isEnabled ( ) : boolean
Результат boolean TRUE if console output is enabled, FALSE otherwise

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

Outputs a prompt when the bot sends a command to a server.
public onCommand ( Phergie_Event_Command $event, Phergie_Connection $connection ) : void
$event Phergie_Event_Command Event representing the command being sent
$connection Phergie_Connection Connection on which the command is being sent
Результат void

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

Outputs a prompt when a server connection is attempted.
public onConnect ( string $host ) : void
$host string Server hostname
Результат void

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

Outputs a prompt when the bot receives an IRC event.
public onEvent ( Phergie_Event_Abstract $event, Phergie_Connection $connection ) : void
$event Phergie_Event_Abstract Received event
$connection Phergie_Connection Connection on which the event was received
Результат void

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

Outputs a prompt when a plugin fails to load.
public onPluginFailure ( string $plugin, string $message ) : void
$plugin string Short name of the plugin
$message string Message describing the reason for the failure
Результат void

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

Outputs a prompt when a plugin is loaded successfully.
public onPluginLoad ( string $plugin ) : void
$plugin string Short name of the plugin
Результат void

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

Outputs a prompt when the bot terminates a connection to a server.
public onQuit ( Phergie_Connection $connection ) : void
$connection Phergie_Connection Terminated connection
Результат void

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

Outputs a prompt when the bot shuts down after terminating all server connections.
public onShutdown ( ) : void
Результат void

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

Sets whether console output is enabled.
public setEnabled ( boolean $enabled = true ) : Phergie_Ui_Console
$enabled boolean TRUE to enable console output, FALSE otherwise, defaults to TRUE
Результат Phergie_Ui_Console Provides a fluent interface

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

Sets the format used for timestamps in console output, overwriting any previous format used.
public setFormat ( string $format ) : Phergie_Ui_Console
$format string Timestamp format
Результат Phergie_Ui_Console Provides a fluent interface

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

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

Flag that toggles all console output
protected bool $enabled
Результат boolean

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

Format for timestamps included in console output
protected string $format
Результат string