PHP Class Phergie_Plugin_Google, phergie

Inheritance: extends Phergie_Plugin_Abstract
Show file Open project: phergie/phergie

Public Methods

Method Description
onCommandConvert ( string $query ) : void Performs a Google search to convert a value from one unit to another.
onCommandDefine ( string $query ) : void Returns the first definition of a Google Dictionary search.
onCommandG ( string $query ) : void Returns the first result of a Google search.
onCommandGc ( string $query ) : void Performs a Google Count search for the given term.
onCommandGconvert ( string $value, string $from, string $to ) : void Perform a Google Convert query to convert a value from one metric to another.
onCommandGmap ( string $location ) : void Performs a Google Maps search for the given term.
onCommandGt ( string $from, string $to, string $query ) : void Performs a Google Translate search for the given term.
onCommandGw ( string $location, integer $offset = null ) : void Performs a Google Weather search for the given term.
onLoad ( ) : void Checks for dependencies.

Method Details

onCommandConvert() public method

Performs a Google search to convert a value from one unit to another.
public onCommandConvert ( string $query ) : void
$query string Query of the form "[quantity] [unit] to [unit2]"
return void

onCommandDefine() public method

Returns the first definition of a Google Dictionary search.
public onCommandDefine ( string $query ) : void
$query string Word to get the definition
return void

onCommandG() public method

Returns the first result of a Google search.
public onCommandG ( string $query ) : void
$query string Search term
return void

onCommandGc() public method

Performs a Google Count search for the given term.
public onCommandGc ( string $query ) : void
$query string Search term
return void

onCommandGconvert() public method

Perform a Google Convert query to convert a value from one metric to another.
public onCommandGconvert ( string $value, string $from, string $to ) : void
$value string Value to convert
$from string Source metric
$to string Destination metric
return void

onCommandGmap() public method

Performs a Google Maps search for the given term.
public onCommandGmap ( string $location ) : void
$location string Location to search for
return void

onCommandGt() public method

Performs a Google Translate search for the given term.
public onCommandGt ( string $from, string $to, string $query ) : void
$from string Language of the search term
$to string Language to which the search term should be translated
$query string Term to translate
return void

onCommandGw() public method

Performs a Google Weather search for the given term.
public onCommandGw ( string $location, integer $offset = null ) : void
$location string Location to search for
$offset integer Optional day offset from the current date between 0 and 3 to get the forecast
return void

onLoad() public method

Checks for dependencies.
public onLoad ( ) : void
return void