Pascal Thormeier
6ef6b7bc08
Remove last var_export statements
...
Got overlooked while refactoring
2015-06-19 11:43:58 +02:00
Pascal Thormeier
15af0f8e52
Remove var_export where unnecessary
2015-06-18 22:56:00 +02:00
Pascal Thormeier
9ebacc28ae
Use Arguments class instead of regex
2015-06-17 23:57:12 +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
a4b6f9627a
Enable argument support in partials
...
Create own context if there are arguments and take values from context
where partial was rendered in. Also allow strings with `=` inside
arguments.
2015-06-17 14:19:57 +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
Martin Zeman
23076d68e5
Added support for class with __toString method as a context variable.
2015-06-07 23:09:14 +02:00
Dmitriy Simushev
824ae885c6
Fix escaping of tags with multiple slashes
2015-06-01 15:15:52 +00:00
Dmitriy Simushev
04f963a21f
Fix slashes mess in Tokenizer
...
See #113 for details
2015-05-19 13:22:15 +00:00
Dave Stein
6c9aa9573c
FilesystemLoader: Updates to be more extendable
...
Directory setting can be overridden
The way a directory is sanitized can be overridden
The way options are handled can be overridden
2015-05-17 16:41:12 -04:00
Szijarto Tamas
bf327cdb24
APC cache improvement
...
- add cache key prefix
- use success param at fetch
2015-05-11 21:35:14 +02:00
Thomas Seven
b65be0e1c5
Implementation + tests for the @root special variable like in handlebars-v2.0.0.js
...
fixed travis complaints
2015-03-10 13:42:10 +01:00
fzerorubigd
382938b82e
fix phpcs and also add mustache.php copyright notice
2015-01-29 22:28:38 +03:30
fzerorubigd
ccaa5b1d21
Merge branch 'master' of https://github.com/mai7star/handlebars.php
2015-01-29 22:20:16 +03:30
fzerorubigd
639c8e4b27
fix php cs also fixes #105
2015-01-29 22:18:26 +03:30
Thomas Seven
8eb24bd9e4
Fixed indentation and comments in the fix for #105
2015-01-29 12:06:21 +01:00
Thomas Seven
84b3031a44
Make the fix for #105 more elegant, using $template->parseArguments()
2015-01-29 11:59:14 +01:00
Thomas Seven
2b3d450849
Fixes and Tests for #105
2015-01-29 01:32:41 +01:00
mai7star
4bf343d122
add InlineLoader Class (import from Mustache PHP)
2015-01-26 13:54:22 +09:00
Jeff Turcotte
69d4efe259
Added custom template class option
2014-12-16 18:35:16 -05:00
Dmitriy Simushev
e8ce548b86
Add ability to merge Helpers collections
2014-12-12 12:25:21 +00:00
David Cramer
666e44beb5
Update Template.php
...
Update Template.php
added test case
2014-11-18 07:36:26 +02:00
Jeff Turcotte
9eb7f952d2
Added getCurrentTokenTree to get a token's tree within a helper
2014-11-10 15:05:34 -05:00
Dmitriy Simushev
e863d7af80
Make subexpressions play nice with context
2014-09-15 09:19:21 +00:00
Dmitriy Simushev
934566765e
Treat integer helper arguments as literals
2014-09-10 12:31:23 +00:00
Dmitriy Simushev
618ec54490
Fix arguments parsing for "0" string
2014-09-08 13:23:19 +00:00
Dmitriy Simushev
2ebc5bfda2
Add special variables detection
2014-09-02 13:08:20 +00:00
Dmitriy Simushev
17dc20203b
Improve arguments parsing
2014-09-02 09:34:38 +00:00
fzerorubigd
de08528c2c
add extra context layer for if and unless. (Toi match with handlebars.js)
2014-08-29 11:17:31 +04:30
fzerorubigd
cc5bb9bf87
Merge branch 'patch-4' of github.com:ulriklystbaek/handlebars.php
2014-08-29 11:09:59 +04:30
fzerorubigd
77e71e6543
Merge branch 'patch-3' of github.com:ulriklystbaek/handlebars.php
2014-08-29 11:08:49 +04:30
ulriklystbaek
122a8a9d7b
Update Context.php
...
Should return null instead of an empty string when context is not found. Handlebars.js returns undefined, which makes it possible to distict an empty string and not existing. (should not affect existing use, because null is handeled the same way as empty string)
2014-08-28 10:10:05 +02:00
ulriklystbaek
abb88322e0
Update UnlessHelper.php
...
To comply with handlebars.js, If adds an extra layer when need to access parents (https://github.com/wycats/handlebars.js/issues/196 )
2014-08-28 09:50:53 +02:00
ulriklystbaek
415a3b00b8
Update IfHelper.php
...
To comply with handlebars.js, If adds an extra layer when need to access parents (https://github.com/wycats/handlebars.js/issues/196 )
2014-08-28 09:49:32 +02:00
Behrooz Shabani
c6f3e0fd5e
Merge pull request #75 from Mibew/named_arguments
...
Add named arguments parser
2014-08-20 23:15:37 +04:30
behrooz shabani (everplays)
07c49bbb3f
make sure that buffer is always a string
2014-08-20 13:08:33 +04:30
behrooz shabani (everplays)
35ea671fd7
fix 0 being treated as empty string, fixes #76
2014-08-20 10:14:02 +04:30
Dmitriy Simushev
92a3815d85
Add named arguments parser
2014-08-19 11:21:20 +00:00
fzerorubigd
84c6e3006c
fix #71
2014-07-11 21:05:26 +04:30
fzerorubigd
a9178d5f01
fix phpcs
2014-07-04 22:30:41 +04:30
fzerorubigd
0a35a913c2
add more test and fix a wrong test, also comment some not-used-at-all codes.
...
If need some of thease code back, create a test case for them.
2014-07-04 22:22:18 +04:30
fzerorubigd
a68318f4c5
Support whitespace deletion
...
Need more test :)
fixes #61
2014-07-04 03:36:14 +04:30
John Slegers
182bfc9aea
Patch 2 for arrays that contain only one elements
...
For arrays that contain only one element, `(array_keys($tmp) == range(0, count($tmp) - 1)` always returns true.
`(array_keys($tmp) === range(0, count($tmp) - 1)` works as expected.
My local test environment = Linux Mint + PHP 5.4.
This patch is identical to https://github.com/XaminProject/handlebars.php/pull/66 , but applies to a different part of the code.
2014-07-03 16:53:22 +02:00
John Slegers
9d0bb58d36
Adding author data
...
Adding author data
2014-07-02 19:08:39 +02:00
John Slegers
c28709eb76
Update EachHelper.php
...
For arrays that contain only one element, `(array_keys($tmp) == range(0, count($tmp) - 1)` always returns true.
`(array_keys($tmp) === range(0, count($tmp) - 1)` works as expected.
2014-07-02 18:59:58 +02:00
Dmitriy Simushev
a6955b83a9
Fix quotes extra escape
2014-06-24 14:42:22 +00:00
behrooz shabani (everplays)
93b6dd8cb6
fixes extra escaping of scalar arguments
2014-06-23 13:29:50 +04:30
behrooz shabani (everplays)
81f3efbb84
helpers with style of array(Object, methodName)
...
Previously we had them working. So for the sake's of backward
compatibility, they should be supported.
2014-03-27 12:03:35 +04:30
Jeff Turcotte
c166af1ed7
Added helper interface and converted all built in helpers
2014-03-26 21:59:57 -04:00