1. Go to this page and download the library: Download jgswift/filtratr 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/ */
class User {
public $name;
function __construct($name) {
$this->name = $name;
}
}
$user = new User(' john smith ');
$filter = filtratr\with($user)->map('name', 'trim | strtoupper')
var_dump($filter()->name); // "JOHN SMITH"
namespace MyQueryExtension;
class MyExtension extends filtratr\Query\AbstractStatement {
/* do stuff here */
}