Skip to content
Snippets Groups Projects
  • Andreas Gohr's avatar
    89177306
    Introducing a $_REQUEST/POST/GET wrapper · 89177306
    Andreas Gohr authored
    This new wrapper ensures types are correct and accessed parameters are
    actually set (with custom default fallbacks).
    
    The wrapper is available in the global $INPUT variable. It accesses
    $_REQUEST by default. If POST or GET is required, the post and get
    members can be used:
    
    $INPUT->int('foo',false); // access $_REQUEST['foo'], default false
    $INPUT->post->int('foo'); // access $_POST['foo'], default 0
    $INPUT->get->int('foo'); // access $_GET['foo'], default 0
    
    The codebase still needs to be updated to make use of this.
    89177306
    History
    Introducing a $_REQUEST/POST/GET wrapper
    Andreas Gohr authored
    This new wrapper ensures types are correct and accessed parameters are
    actually set (with custom default fallbacks).
    
    The wrapper is available in the global $INPUT variable. It accesses
    $_REQUEST by default. If POST or GET is required, the post and get
    members can be used:
    
    $INPUT->int('foo',false); // access $_REQUEST['foo'], default false
    $INPUT->post->int('foo'); // access $_POST['foo'], default 0
    $INPUT->get->int('foo'); // access $_GET['foo'], default 0
    
    The codebase still needs to be updated to make use of this.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.