PHP code example of ramsey / twig-codeblock
1. Go to this page and download the library: Download ramsey/twig-codeblock 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/ */
ramsey / twig-codeblock example snippets
twig
{% codeblock lang:"php" %}
class Bar implements BarInterface
{
private $baz;
public function __construct(BazInterface $baz)
{
$this->baz = $baz;
}
public function doIt()
{
return $this->baz->do('it');
}
}
{% endcodeblock %}