src/Router/Routes/RouteBinding.php
protected function bindVarSuperGlobal($option, ServerRequestInterface $request, &$value)
    {
        if (preg_match('/^\$_(GET|POST|COOKIE)\[([^\[]*)\]$/i', $option, $matches)) {
            list(, $var, $key) = $matches;

            $var = strtolower($var);
            $data = null;

            if ($var === 'get') {
                $data = $request->getQueryParams();                
            } elseif ($var === 'post') {
                $data = $request->getParsedBody();
            } elseif ($var === 'cookie') {
                $data = $request->getCookieParams();
            }

            $value = isset($data[$key]) ? [$data[$key]] : null;
            return true;
        }
        
        return false;
    }
protected function bindVarSuperGlobal($option, ServerRequestInterface $request, &$value)
    {
        if (preg_match('/^\$_(GET|POST|COOKIE)\[([^\[]*)\]$/i', $option, $matches)) {
            list(, $var, $key) = $matches;

            $var = strtolower($var);
            $data = null;

            if ($var === 'get') {
                $data = $request->getQueryParams();                
            } elseif ($var === 'post') {
                $data = $request->getParsedBody();
            } elseif ($var === 'cookie') {
                $data = $request->getCookieParams();
            }

            $value = isset($data[$key]) ? [$data[$key]] : null;
            return true;
        }
        
        return false;
    }
protected function bindVarSuperGlobal ( $ option , ServerRequestInterface $ request , & $ value ) { if ( preg_match ( '/^\$_(GET|POST|COOKIE)\[([^\[]*)\]$/i' , $ option , $ matches ) ) { list ( , $ var , $ key ) = $ matches ; $ var = strtolower ( $ var ) ; $ data = null ; if ( $ var === 'get' ) { $ data = $ request -> getQueryParams ( ) ; } elseif ( $ var === 'post' ) { $ data = $ request -> getParsedBody ( ) ; } elseif ( $ var === 'cookie' ) { $ data = $ request -> getCookieParams ( ) ; } $ value = isset ( $ data [ $ key ] ) ? [ $ data [ $ key ] ] : null ; return true ; } return false ; }
Bind variable when option is a super global

@param string $option
@param mixed  $value   OUTPUT
@return boolean
Bind variable when option is a super global