/**
  * {@inheritDoc}
  */
 function load(array $options = array())
 {
     if (!isset($options['filters']) || !is_array($options['filters'])) {
         throw new InvalidArgumentException('Expected filters key and type of array');
     }
     $filters = array();
     foreach ($options['filters'] as $loaderName => $opts) {
         $filters[] = $this->filterManager->getLoader($loaderName)->load(is_array($opts) ? $opts : []);
     }
     return new ChainFilter($filters);
 }
 /**
  * {@inheritDoc}
  */
 function load(array $options = array())
 {
     if (false == isset($options['filters']) || false == is_array($options['filters'])) {
         throw new \InvalidArgumentException('Expected filters key and type of array');
     }
     if (false == $options['filters']) {
         throw new \InvalidArgumentException('At least one filter expected');
     }
     $filters = array();
     foreach ($options['filters'] as $loaderName => $loaderOptions) {
         $loader = $this->filterManager->getLoader($loaderName);
         $loaderOptions = is_array($loaderOptions) ? $loaderOptions : array();
         $filters[] = $loader->load($loaderOptions);
     }
     return new ChainFilter($filters);
 }