You are here

public function HydratorPluginManager::validatePlugin in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-hydrator/src/HydratorPluginManager.php \Zend\Hydrator\HydratorPluginManager::validatePlugin()

File

vendor/zendframework/zend-hydrator/src/HydratorPluginManager.php, line 61

Class

HydratorPluginManager
Plugin manager implementation for hydrators.

Namespace

Zend\Hydrator

Code

public function validatePlugin($plugin) {
  if ($plugin instanceof HydratorInterface) {

    // we're okay
    return;
  }
  throw new Exception\RuntimeException(sprintf('Plugin of type %s is invalid; must implement Zend\\Hydrator\\HydratorInterface', is_object($plugin) ? get_class($plugin) : gettype($plugin)));
}