handlebars.php-helpers/src/Helpers.php

39 lines
956 B
PHP
Raw Normal View History

2014-12-12 17:47:27 +03:00
<?php
/*
* This file is part of Handlebars.php Helpers Set
*
* (c) Dmitriy Simushev <simushevds@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace JustBlackBird\HandlebarsHelpers;
use Handlebars\Helpers as BaseHelpers;
/**
* Contains all helpers.
*
* @author Dmitriy Simushev <simushevds@gmail.com>
*/
class Helpers extends BaseHelpers
{
/**
* {@inheritdoc}
*/
protected function addDefaultHelpers()
{
parent::addDefaultHelpers();
// Date helpers
$this->add('formatDate', new Date\FormatDateHelper());
// Comparison helpers
$this->add('ifEqual', new Comparison\IfEqualHelper());
$this->add('ifEven', new Comparison\IfEvenHelper());
$this->add('ifOdd', new Comparison\IfOddHelper());
$this->add('unlessEqual', new Comparison\UnlessEqualHelper());
}
}