Phergie_Plugin_Abstract::getName PHP Method

getName() public method

Returns the short name for the plugin based on its class name.
public getName ( ) : string
return string
    public function getName()
    {
        if (empty($this->name)) {
            $this->name = substr(strrchr(get_class($this), '_'), 1);
        }
        return $this->name;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Sets the description for the command on the plugin instance
  * 
  * @param Phergie_Plugin_Abstract $plugin      plugin instance
  * @param string                  $command     from onCommand method
  * @param string                  $description command description
  *
  * @return void
  */
 public function setCommandDescription(Phergie_Plugin_Abstract $plugin, $command, array $description)
 {
     $this->registry[strtolower($plugin->getName())]['cmd'][$command] = $description;
 }