PHP Class Phergie_Plugin_Help, phergie

Author: Phergie Development Team ([email protected])
Inheritance: extends Phergie_Plugin_Abstract
Show file Open project: phergie/phergie

Protected Properties

Property Type Description
$registry array Registry of help data indexed by plugin name

Public Methods

Method Description
onCommandHelp ( string $query = null ) : void Displays a list of plugins with help information available or commands available for a specific plugin.
onConnect ( ) : void Creates a registry of plugin metadata on connect.
onLoad ( ) : void Checks for dependencies.
populateRegistry ( ) : void Creates a registry of plugin metadata.

Protected Methods

Method Description
getAnnotations ( string $docblock ) : array Taken from PHPUnit/Util/Test.php and modified to fix an issue with tag content spanning multiple lines.
parseShortDescription ( string $docblock ) : string Parses and returns the short description from a docblock.

Method Details

getAnnotations() protected method

PHPUnit Copyright (c) 2002-2012, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Sebastian Bergmann nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
protected getAnnotations ( string $docblock ) : array
$docblock string docblock to parse
return array

onCommandHelp() public method

Displays a list of plugins with help information available or commands available for a specific plugin.
public onCommandHelp ( string $query = null ) : void
$query string Optional short name of a plugin for which commands should be returned or a command; if unspecified, a list of plugins with help information available is returned
return void

onConnect() public method

Creates a registry of plugin metadata on connect.
public onConnect ( ) : void
return void

onLoad() public method

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

parseShortDescription() protected method

Parses and returns the short description from a docblock.
protected parseShortDescription ( string $docblock ) : string
$docblock string Docblock comment code
return string Short description (i.e. content from the start of the docblock up to the first double-newline)

populateRegistry() public method

Creates a registry of plugin metadata.
public populateRegistry ( ) : void
return void

Property Details

$registry protected property

Registry of help data indexed by plugin name
protected array $registry
return array