Commit Graph

19 Commits

Author SHA1 Message Date
behrooz shabani (everplays)
e5c03d3b01
properly pop the context for fn and inverse callbacks
fixes #160.
2016-11-16 21:52:19 +01:00
hamidr
86ebab9dba Merge remote-tracking branch 'origin/develop' 2016-07-31 14:30:53 +04:30
Maria Sormanova
3a25d9bf17 added versioning to prevent breaking existing projects 2016-07-26 10:43:18 +02:00
Maria Sormanova
51f8a3056b Implementation of TTL for caching 2016-07-25 16:14:39 +02:00
Christian Blanquera
08ad533e81 case for the right String Class
Not sure where i got StringWrapper from. We now don’t need to case for
this in the `registerHelper()` method
2015-09-26 20:03:52 +08:00
Christian Blanquera
0070ad79c0 phpcs approval
“oh the spacing!”
2015-09-21 18:49:08 +08:00
Christian Blanquera
33c76738b4 Added registerHelper
I did it in such a way where I’m not messing with the other methods or
classes to get what I wanted.

I realize that there maybe no need for the child context, however when
trying a permutation of

```
'fn' => function($data = null) use($context, $template) {
    $context->push($context->last());

    if(is_array($data)) {
   		$context->push($data);
   	}

    $template->setStopToken('else');
    $buffer = $template->render($context);
    $template->setStopToken(false);
    $template->discard($context);

    if(is_array($data)) {
   		$context->pop();
   	}

    $context->pop();

    return $buffer;
}
```
It didn’t parse the `../../../test` correctly in the test. I figured
that the ChildContext is a nice pattern overall and doesn’t interfere
with the rest of the package anyways…
2015-09-21 17:50:00 +08:00
Pascal Thormeier
15af0f8e52 Remove var_export where unnecessary 2015-06-18 22:56:00 +02:00
Pascal Thormeier
e1956be453 CS fixes 2015-06-17 16:11:50 +02:00
Pascal Thormeier
0111689f47 Fix and add tests
Also use var_export in exceptions in case array/object/etc get passed
2015-06-17 15:50:10 +02:00
Pascal Thormeier
0a908fb6a1 Improve error reporting in case of exception
Make Exception messages more verbose
2015-06-17 14:18:32 +02:00
Jeff Turcotte
69d4efe259 Added custom template class option 2014-12-16 18:35:16 -05:00
behrooz shabani (everplays)
7f6dcf6c3e final touch on fixing missing copyright notices 2014-03-17 13:44:21 +03:30
fzerorubigd
8938fdc5c3
Another cleanup 2013-11-08 18:48:19 +03:30
fzerorubigd
d1856a4ed3
Cleanup. 2013-11-08 15:00:49 +03:30
behrooz shabani (everplays)
e513648544 use PHP CodeSniffer's coding standards 2013-11-05 14:12:44 +03:30
behrooz shabani (everplays)
8ed1ebd051 Merge branch 'master' of github.com:virtuecenter/handlebars.php
Conflicts:
	src/Handlebars/Template.php
2013-11-05 10:58:02 +03:30
webuser
95c5821097 add factory 2013-09-22 09:56:44 -04:00
webuser
82a9faf3eb add namespace, remove underscores from class names 2013-09-21 15:10:30 -04:00