src/Parameters.php
public function getAsInstance($path)
    {
        if (empty($path)) {
            return static::create([], $this->separator);
        }
        $value = $this->getAsArray($path);
        if (!is_array($value)) {
            throw new \InvalidArgumentException('You cannot return a Parameter instance on a non-array value.');
        }
        return static::create($this->getAsArray($path), $this->separator);
    }
public function getAsInstance($path)
    {
        if (empty($path)) {
            return static::create([], $this->separator);
        }
        $value = $this->getAsArray($path);
        if (!is_array($value)) {
            throw new \InvalidArgumentException('You cannot return a Parameter instance on a non-array value.');
        }
        return static::create($this->getAsArray($path), $this->separator);
    }
public function getAsInstance ( $ path ) { if ( empty ( $ path ) ) { return static :: create ( [ ] , $ this -> separator ) ; } $ value = $ this -> getAsArray ( $ path ) ; if ( ! is_array ( $ value ) ) { throw new \ InvalidArgumentException ( 'You cannot return a Parameter instance on a non-array value.' ) ; } return static :: create ( $ this -> getAsArray ( $ path ) , $ this -> separator ) ; }
Gets a value based on a path, and returns it as a Parameters instance.

@param   string  $path   The parameter path, such as 'foo' or 'foo.bar'
@return  self
Gets a value based on a path and returns it as a Parameters instance .