Cascade\Config\Loader\ClassLoader\Resolver\ExtraOptionsResolver::resolve PHP Method

resolve() public method

Resolve options against extra params requirements
public resolve ( array $options, ClassLoader $classLoader = null ) : array
$options array Array of option values
$classLoader Cascade\Config\Loader\ClassLoader Optional class loader if you want to use custom handlers to resolve the extra options
return array Array of resolved options
    public function resolve($options, ClassLoader $classLoader = null)
    {
        $hashKey = self::generateParamsHashKey($this->params);
        // Was configureOptions() executed before for this class?
        if (!isset(self::$resolvers[$hashKey])) {
            self::$resolvers[$hashKey] = new OptionsResolver();
            $this->configureOptions(self::$resolvers[$hashKey], $classLoader);
        }
        return self::$resolvers[$hashKey]->resolve($options);
    }

Usage Example

 /**
  * Test resolving with invalid options. It should throw an exception.
  *
  * @param  array $invalidOptions Array of invalid options
  * @dataProvider invalidOptionsProvider
  * @expectedException Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
  */
 public function testResolveWithInvalidOptions($invalidOptions)
 {
     $this->resolver->resolve($invalidOptions);
 }
All Usage Examples Of Cascade\Config\Loader\ClassLoader\Resolver\ExtraOptionsResolver::resolve