27 $value = $this->getByPath($this->options,
$name, $defaultValue);
28 if ($value instanceof \Closure)
45 private function getByPath($array, $path, $defaultValue =
null)
47 if(!is_array($array) && !$array instanceof \ArrayAccess)
49 throw new ArgumentException(
"\$array is not array or don't implement ArrayAccess");
52 $pathItems = explode(
'.', $path);
55 foreach($pathItems as $pathItem)
57 if(!is_array($lastArray) && !$lastArray instanceof \ArrayAccess)
62 if(!isset($lastArray[$pathItem]))
67 $lastArray = $lastArray[$pathItem];
static getAllowedContentTypes()
__construct($name, Uri $sourceUri, array $options=[])
static getSizeRestriction()
getOption($name, $defaultValue=null)