1. Go to this page and download the library: Download proteins/filter 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/ */
proteins / filter example snippets
use Proteins\Filter;
use Proteins\Filters;
class MyClass {
use Filters;
}
Filter::add('title',function($title){
return strtoupper($title);
});
Filter::add('title',function($title){
return $title . '!';
});
echo Filter::with('title','This was a triumph');
// THIS WAS A TRIUMPH!
Filter::with(["document.title", "title"],'This was a triumph')
Filter::add("title", "strtoupper");
echo Filter::with(["document.title", "title"],'This was a triumph');
Filter::add("title", "strtoupper");
Filter::add("document.title", "str_rot13");
echo Filter::with(["document.title", "title"],'This was a triumph');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.