PHP code example of symplify / template-checker
1. Go to this page and download the library: Download symplify/template-checker 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 / template-checker example snippets
final class SomeController
{
public function index()
{
return $this->render('does_path_exist.twig');
}
}
use App\Contract\Latte\FilterProviderInterface;
use App\SomeClass;
final class SomeMethodFilterProvider implements FilterProviderInterface
{
public const FILTER_NAME = 'someMethod';
public function __invoke(string $name): int
{
return SomeClass::someStaticMethod($name);
}
public function getName(): string
{
return self::FILTER_NAME;
}
}