Phergie_Plugin_Php_Source::findFunction PHP Method

findFunction() public method

Searches for a description of the function.
public findFunction ( string $function ) : array | null
$function string Search pattern to match against the function name, wildcards supported using %
return array | null Associative array containing the function name and description or NULL if no results are found
    public function findFunction($function);

Usage Example

示例#1
0
文件: Php.php 项目: Bittarman/phergie
 /**
  * Searches the data source for the requested function.
  * 
  * @param string $functionName Name of the function to search for
  *
  * @return void
  */
 public function onCommandPhp($functionName)
 {
     // Search for the function
     if ($function = $this->source->findFunction($functionName)) {
         $msg = 'PHP ' . $function['name'] . ': ' . $function['description'];
     } else {
         $msg = 'Search for function ' . $functionName . ' returned no results.';
     }
     // Return the result to the source
     $this->doPrivmsg($this->getEvent()->getSource(), $msg);
 }
All Usage Examples Of Phergie_Plugin_Php_Source::findFunction
Phergie_Plugin_Php_Source