Phergie_Plugin_Abstract::setConnection PHP Method

setConnection() public method

Sets the current connection.
public setConnection ( Phergie_Connection $connection ) : Phergie_Plugin_Abstract
$connection Phergie_Connection Connection
return Phergie_Plugin_Abstract Provides a fluent interface
    public function setConnection(Phergie_Connection $connection)
    {
        $this->connection = $connection;
        return $this;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Initializes instance properties.
  *
  * @return void
  */
 public function setUp()
 {
     if (empty($this->pluginClass)) {
         $this->pluginClass = preg_replace('/Test$/', '', get_class($this));
     }
     if (empty($this->plugin)) {
         $this->plugin = new $this->pluginClass();
     }
     $this->plugin->setConfig($this->getMockConfig());
     $this->plugin->setConnection($this->getMockConnection());
     $this->plugin->setEventHandler($this->getMockEventHandler());
     $this->plugin->setPluginHandler($this->getMockPluginHandler());
 }
All Usage Examples Of Phergie_Plugin_Abstract::setConnection