/**
  * Remove the plugin identified by $name
  * @param string The ID of the plugin
  * @return boolean
  */
 public function removePlugin($name)
 {
     try {
         $this->swift->removePlugin($name);
         return true;
     } catch (Exception $e) {
         return false;
     }
 }
 public function testListenersCanBeRemovedOnceAdded()
 {
     $listener = new MockSendListener();
     $conn = $this->getWorkingMockConnection(1);
     $swift = new Swift($conn);
     $swift->attachPlugin($listener, "myplugin");
     $this->assertReference($listener, $swift->getPlugin("myplugin"));
     $swift->removePlugin("myplugin");
     $this->assertNull($swift->getPlugin("myplugin"));
 }
Example #3
0
 /**
  * Remove the plugin identified by $name
  * @param string The ID of the plugin
  * @return boolean
  */
 function removePlugin($name)
 {
     $this->swift->removePlugin($name);
     return true;
 }