Gajus\Dora\Input::getNamePath PHP Method

getNamePath() public method

Parse input[name] into an array reprensentation.
public getNamePath ( ) : array
return array [name="a[b][c][]"] is represented ['a', 'b', 'c'].
    public function getNamePath()
    {
        if (strpos($this->attributes['name'], '[') === false) {
            return [$this->attributes['name']];
        }
        $path = explode('[', $this->attributes['name'], 2);
        // ['name']['[foo][bar]']
        return array_merge([$path[0]], explode('][', mb_substr($path[1], 0, -1)));
    }