public function decodeRequest(array $request)
    {
        foreach ($request as $key => $value) {
            if (is_array($value)) {
                $request[ $key ] = $this->decodeRequest($value);
            } elseif (strpos($key, '[')) {
                preg_match('/(.+?)\[(.+?)\]/', $key, $matches);
                list($match, $name, $subKey) = $matches;

                if (!isset($request[ $name ])) {
                    $request[ $name ] = array();
                }

                $request[ $name ][ $subKey ] = $value;
                unset($request[ $key ]);
            }
        }
        return $request;
    }
public function decodeRequest(array $request)
    {
        foreach ($request as $key => $value) {
            if (is_array($value)) {
                $request[ $key ] = $this->decodeRequest($value);
            } elseif (strpos($key, '[')) {
                preg_match('/(.+?)\[(.+?)\]/', $key, $matches);
                list($match, $name, $subKey) = $matches;

                if (!isset($request[ $name ])) {
                    $request[ $name ] = array();
                }

                $request[ $name ][ $subKey ] = $value;
                unset($request[ $key ]);
            }
        }
        return $request;
    }
public function decodeRequest ( array $ request ) { foreach ( $ request as $ key => $ value ) { if ( is_array ( $ value ) ) { $ request [ $ key ] = $ this -> decodeRequest ( $ value ) ; } elseif ( strpos ( $ key , '[' ) ) { preg_match ( '/(.+?)\[(.+?)\]/' , $ key , $ matches ) ; list ( $ match , $ name , $ subKey ) = $ matches ; if ( ! isset ( $ request [ $ name ] ) ) { $ request [ $ name ] = array ( ) ; } $ request [ $ name ] [ $ subKey ] = $ value ; unset ( $ request [ $ key ] ) ; } } return $ request ; }
Decode request array variables

@param array $request
@return mixed
Decode request array variables