PHP code example of symplify / modular-latte-filters

1. Go to this page and download the library: Download symplify/modular-latte-filters 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/ */

    

symplify / modular-latte-filters example snippets


namespace App\Modules\SomeModule\Latte;

use Symplify\ModularLatteFilters\DI\FiltersProviderInterface;


final class SomeFilters implements FiltersProviderInterface
{

	public function getFilters() : array
	{
		return [
			'double' => function ($value) {
				return $value * 2;
			}
		];
	}

}