PHP 클래스 Phergie_Ui_Console, phergie

저자: Phergie Development Team ([email protected])
상속: extends Phergie_Ui_Abstract
파일 보기 프로젝트 열기: phergie/phergie

보호된 프로퍼티들

프로퍼티 타입 설명
$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