src/Router/Routes/RouteBinding.php
protected function bindVarRequestHeader($option, ServerRequestInterface $request, &$value)
    {
        if (preg_match('/^\$(?:HTTP_)?([A-Z_]+)$/', $option, $matches)) {
            $sentence = preg_replace('/[\W_]+/', ' ', $matches[1]);
            $name = str_replace(' ', '-', ucwords($sentence));
            
            $value = [$request->getHeaderLine($name)];
            return true;
        }
        
        return false;
    }
protected function bindVarRequestHeader($option, ServerRequestInterface $request, &$value)
    {
        if (preg_match('/^\$(?:HTTP_)?([A-Z_]+)$/', $option, $matches)) {
            $sentence = preg_replace('/[\W_]+/', ' ', $matches[1]);
            $name = str_replace(' ', '-', ucwords($sentence));
            
            $value = [$request->getHeaderLine($name)];
            return true;
        }
        
        return false;
    }
protected function bindVarRequestHeader ( $ option , ServerRequestInterface $ request , & $ value ) { if ( preg_match ( '/^\$(?:HTTP_)?([A-Z_]+)$/' , $ option , $ matches ) ) { $ sentence = preg_replace ( '/[\W_]+/' , ' ' , $ matches [ 1 ] ) ; $ name = str_replace ( ' ' , '-' , ucwords ( $ sentence ) ) ; $ value = [ $ request -> getHeaderLine ( $ name ) ] ; return true ; } return false ; }
Bind variable when option is a request header

@param string                 $option
@param ServerRequestInterface $request
@param mixed                  $value   OUTPUT
@return boolean
Bind variable when option is a request header