public function get($parameters, $name)
 {
     if (!$this->has($parameters, $name)) {
         throw new \InvalidArgumentException(sprintf('The parameter "%s" does not exist.', $name));
     }
     return f\get_in($parameters, $this->depthForName($name));
 }
Beispiel #2
0
 /**
  * @expectedException \InvalidArgumentException
  * @dataProvider provideGetIn
  */
 public function testGetInShouldThrowAnExceptionIfAnyDepthIsNotAnArray($coll)
 {
     f\get_in($coll, array('foo', 'two', 'ups'));
 }