PHP code example of box-project / processor
1. Go to this page and download the library: Download box-project/processor 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/ */
box-project / processor example snippets
use Box\Component\Processor\Processor\Any\ReplaceProcessor;
$processor = new ReplaceProcessor();
$processor->setReplacement('/{{\s*name\s*}}/', 'world');
$processor->setExtensions(array('txt'));
// "Hello, world!"
echo $processor->processContents('example.txt', 'Hello, {{ name }}!');