PHP Class Phergie_Plugin_Serve, phergie

Inheritance: extends Phergie_Plugin_Abstract
Afficher le fichier Open project: phergie/phergie

Méthodes publiques

Méthode Description
onLoad ( ) : void Checks for dependencies.
serve ( string $database, string $table, string $format, string $request, boolean $censor = false ) : boolean Processes a request to serve a user something.

Méthodes protégées

Méthode Description
getItem ( string $database, string $table, array $request ) : object Retrieves a random item from the database table.

Method Details

getItem() protected méthode

Retrieves a random item from the database table.
protected getItem ( string $database, string $table, array $request ) : object
$database string Path to the SQLite database file
$table string Name of the database table
$request array Parsed request
Résultat object Retrieved item

onLoad() public méthode

Checks for dependencies.
public onLoad ( ) : void
Résultat void

serve() public méthode

Processes a request to serve a user something.
public serve ( string $database, string $table, string $format, string $request, boolean $censor = false ) : boolean
$database string Path to the SQLite database file
$table string Name of the database table
$format string Format of the response where %target%, %item%, %article%', and %link will be replaced with their respective data
$request string Request string including the target and an optional suggestion of the item to fetch
$censor boolean TRUE to integrate with the Censor plugin, defaults to FALSE
Résultat boolean TRUE if the request was processed successfully, FALSE otherwise