for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author @jayS-de <[email protected]>
*/
namespace JaySDe\HandlebarsBundle;
use JaySDe\HandlebarsBundle\Helper\HelperInterface;
class HandlebarsHelperService implements HandlebarsHelperServiceInterface
{
private $helpers = [];
* @inheritdoc
public function addHelper($id, $helper)
if ($helper instanceof HelperInterface) {
$this->helpers[$id] = [$helper, 'handle'];
} elseif (is_callable($helper)) {
$this->helpers[$id] = $helper;
}
public function getHelperMethods()
return array_keys($this->helpers);
public function getHelpers()
return $this->helpers;