PHP 클래스 Phergie_Plugin_Lart, phergie

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

보호된 프로퍼티들

프로퍼티 타입 설명
$db PDO PDO instance for the database
$delete PDOStatement Prepared statement for deleting the definition for a given term
$process PDOStatement Prepared statement for searching for a definition for which the term matches as a regular expression against a given search string
$save PDOStatement Prepared statement for inserting a new definition
$select PDOStatement Prepared statement for searching for a definition by its exact term

공개 메소드들

메소드 설명
onAction ( ) : void Processes definition triggers in CTCP actions.
onCommandAddlart ( string $term, string $definition ) : void Creates a new definition.
onCommandDeletelart ( string $term ) : void Removes an existing definition.
onCommandLartinfo ( string $term ) : void Returns information about a definition.
onLoad ( ) : void Checks for dependencies and initializes the database.
onPrivmsg ( ) : void Processes definition triggers in messages.

보호된 메소드들

메소드 설명
deleteLart ( string $term ) : boolean Deletes a given definition.
getLart ( string $term ) : mixed Retrieves the definition for a given term if it exists.
processLart ( ) : void Processes definition triggers in the text of the current event.
saveLart ( string $term, string $definition ) : boolean Saves a given definition.

메소드 상세

deleteLart() 보호된 메소드

Deletes a given definition.
protected deleteLart ( string $term ) : boolean
$term string Term for which the definition should be deleted
리턴 boolean TRUE if the definition was found and deleted, FALSE otherwise

getLart() 보호된 메소드

Retrieves the definition for a given term if it exists.
protected getLart ( string $term ) : mixed
$term string Term to search for
리턴 mixed String containing the definition or FALSE if no definition exists

onAction() 공개 메소드

Processes definition triggers in CTCP actions.
public onAction ( ) : void
리턴 void

onCommandAddlart() 공개 메소드

Creates a new definition.
public onCommandAddlart ( string $term, string $definition ) : void
$term string Term to add
$definition string Definition to add
리턴 void

onCommandDeletelart() 공개 메소드

Removes an existing definition.
public onCommandDeletelart ( string $term ) : void
$term string Term for which the definition should be removed
리턴 void

onCommandLartinfo() 공개 메소드

Returns information about a definition.
public onCommandLartinfo ( string $term ) : void
$term string Term about which to return information
리턴 void

onLoad() 공개 메소드

Checks for dependencies and initializes the database.
public onLoad ( ) : void
리턴 void

onPrivmsg() 공개 메소드

Processes definition triggers in messages.
public onPrivmsg ( ) : void
리턴 void

processLart() 보호된 메소드

Processes definition triggers in the text of the current event.
protected processLart ( ) : void
리턴 void

saveLart() 보호된 메소드

Saves a given definition.
protected saveLart ( string $term, string $definition ) : boolean
$term string Term to trigger a response containing the corresponding definition, may be a regular expression
$definition string Definition corresponding to the term
리턴 boolean TRUE if the definition was saved successfully, FALSE otherwise

프로퍼티 상세

$db 보호되어 있는 프로퍼티

PDO instance for the database
protected PDO $db
리턴 PDO

$delete 보호되어 있는 프로퍼티

Prepared statement for deleting the definition for a given term
protected PDOStatement $delete
리턴 PDOStatement

$process 보호되어 있는 프로퍼티

Prepared statement for searching for a definition for which the term matches as a regular expression against a given search string
protected PDOStatement $process
리턴 PDOStatement

$save 보호되어 있는 프로퍼티

Prepared statement for inserting a new definition
protected PDOStatement $save
리턴 PDOStatement

$select 보호되어 있는 프로퍼티

Prepared statement for searching for a definition by its exact term
protected PDOStatement $select
리턴 PDOStatement