PHPackages                             davideorazio/handlebars.php-helpers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. davideorazio/handlebars.php-helpers

ActiveLibrary[Templating &amp; Views](/categories/templating)

davideorazio/handlebars.php-helpers
===================================

Handlebars helpers for xamin/handlebars (https://github.com/XaminProject/handlebars.php)

1516PHP

Since Oct 16Pushed 11y ago1 watchersCompare

[ Source](https://github.com/DavideMontersino/handlebars.php-helpers)[ Packagist](https://packagist.org/packages/davideorazio/handlebars.php-helpers)[ RSS](/packages/davideorazio-handlebarsphp-helpers/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

\#HandlebarsHelpers
===================

[](#handlebarshelpers)

I'm collecting here some xamin/handlebars.php helpers that I find useful.

\#Installation Of course, you need (xamin/handlebars)\[\] to use this helpers. Fortunately, if you install via composer, dependencies are automatically handled:

```
composer require davideorazio/handlebars.php-helpers:dev-master

```

otherwise, just update your composer.json file:

```
{
    "require": {
        ...
        "davideorazio/handlebars.php-helpers": "dev-master",
        ...
    }
}

```

and run `composer update`.

\#Usage

In order to use the helpers, you need to register them into your Handlebars instance:

```
//Use include statements, or use the full namespace and class name below
use DavideOrazio\HandlebarsHelpers\DateHelper;
use DavideOrazio\HandlebarsHelpers\StringFormatHelper;
use DavideOrazio\HandlebarsHelpers\EachUpToHelper;
use DavideOrazio\HandlebarsHelpers\CountHelper;
use DavideOrazio\HandlebarsHelpers\VarDumpHelper;

//Just a instance creation example
$engine = new Handlebars(array(
            'loader' => new \Handlebars\Loader\FilesystemLoader(array('path/to/folder/one','path/to/folder/two')),
            'partials_loader' => new \Handlebars\Loader\FilesystemLoader(
                array('path/to/folder/one','path/to/folder/two'),
                array(
                    'prefix' => '_'
                )
            )//,
        ));

//Here you register your helpers
$engine->addHelper('Date',new DateHelper());
$engine->addHelper('StringFormat',new StringFormatHelper());
$engine->addHelper('EachUpTo',new EachUpToHelper());
$engine->addHelper('Count',new CountHelper());
$engine->addHelper('VarDump',new VarDumpHelper());

```

\##DateHelper Formats a date in day-month-year

```
{{#Date yourDateVar}}

```

\##StringFormat A simple wrapper for PHP's `sprintf`.. (currently for one var only)!

```
{{#StringFormat "your variable string: %s" yourVar}}

```

\##EachUpTo Allows you to loop through `yourVar`, but specifing a maximum number of items (`upperLimit`)

```
{{#EachUpTo yourVar upperLimit}}
...
{{/EachUpTo}}

```

\##Count Just prints the count of an array

```
{{#Count yourArray}}

```

\##VarDump Prints a var\_dump of the variable

```
{{#VarDump yourVar}}

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe40e2c0ba070dd2966ccc13639a34c17869e80feb09cabff43ccaba79545ae2?d=identicon)[DavideOrazio](/maintainers/DavideOrazio)

---

Top Contributors

[![DavideMontersino](https://avatars.githubusercontent.com/u/144723?v=4)](https://github.com/DavideMontersino "DavideMontersino (14 commits)")[![weaverryan](https://avatars.githubusercontent.com/u/121003?v=4)](https://github.com/weaverryan "weaverryan (3 commits)")

### Embed Badge

![Health badge](/badges/davideorazio-handlebarsphp-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/davideorazio-handlebarsphp-helpers/health.svg)](https://phpackages.com/packages/davideorazio-handlebarsphp-helpers)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.1k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.3k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

282.2k](/packages/webkinder-sproutset)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
