'Zend\Mail\Protocol\Smtp\Auth\Crammd5', 'login' => 'Zend\Mail\Protocol\Smtp\Auth\Login', 'plain' => 'Zend\Mail\Protocol\Smtp\Auth\Plain', 'smtp' => 'Zend\Mail\Protocol\Smtp', ); /** * Validate the plugin * * Checks that the extension loaded is an instance of Smtp. * * @param mixed $plugin * @return void * @throws Exception\InvalidArgumentException if invalid */ public function validatePlugin($plugin) { if ($plugin instanceof Smtp) { // we're okay return; } throw new Exception\InvalidArgumentException(sprintf( 'Plugin of type %s is invalid; must extend %s\Smtp', (is_object($plugin) ? get_class($plugin) : gettype($plugin)), __NAMESPACE__ )); } }