PHP code example of tasmaniski / zf2-params-helper

1. Go to this page and download the library: Download tasmaniski/zf2-params-helper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tasmaniski / zf2-params-helper example snippets


//will read all variables from $_POST
$this->params()->fromPost();

//will read all variables from Routes
$this->params()->fromRoute();

//will read all variables from $_GET
$this->params()->fromQuery();

//will read var with name 'id' and if id is null it will return 1 as default
$this->params()->fromRoute('id', 1);


'modules' => array(
    '...',
    'ParamsHelper'
),