Commit Graph

55 Commits

Author SHA1 Message Date
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
Jeff Turcotte
c166af1ed7 Added helper interface and converted all built in helpers 2014-03-26 21:59:57 -04:00
behrooz shabani (everplays)
97201fe861 local merge of #56 PR. fixes 54 2014-03-20 22:55:05 +03:30
majortom731
ffcbecf346 Implemented proper treatment of brackets inside string arguments in subexpressions ( {{foo '(bar)'}} ) 2014-03-17 23:01:30 +01:00
majortom731
30f7afeb84 More code style / indentation fixes 2014-03-17 16:46:12 +01:00
majortom731
5257701669 Fixed indentation / code style 2014-03-17 16:41:54 +01:00
behrooz shabani (everplays)
413585f9ce Added missing copyright notices. fixes #57 2014-03-17 00:58:50 +03:30
majortom731
41722af86d Added testHelperSubexpressions() 2014-03-12 19:39:05 +01:00
majortom731
3fc92fcdc5 Added support for subexpressions in helper calls. Not sure if Template.php is the best place to handle subexpressions... 2014-03-12 19:33:46 +01:00
fzerorubigd
939c58bbee
Some test improvement and add an ArrayLoader 2014-02-26 20:26:51 +03:30
Dmitriy Simushev
39dd482df5 Add "@first" and "@last" values to "each" helper 2014-02-25 13:24:41 +00:00
Dmitriy Simushev
9d62ffd581 Use both "@index" and "@key" for associative arrays 2014-02-25 12:40:47 +00:00
Dmitriy Simushev
b4c019372b Add segment-literal notation for expressions 2014-02-05 09:07:02 +00:00
Dmitriy Simushev
79373a193a Add \Handlebars\SafeString class 2014-02-03 08:50:01 +00:00
Dmitriy Simushev
b6a903fee8 Use handlebars escape function for helpers' results 2014-02-01 10:44:23 +00:00
behrooz shabani (everplays)
3a3ab36c5f escape helpers. fixes #42 2014-02-01 11:29:52 +03:30
Dmitriy Simushev
93884fb26b Add "else" block to "each" helper 2014-01-23 11:44:34 +00:00
Chris Gray
4d5e433e61 Fixed formating. 2014-01-20 11:14:53 -06:00
Chris Gray
a44777f52f Added Tests and changed internal representation of quoted string literals from strangely quoted string to an instance of \Handlebars\String 2014-01-20 09:57:16 -06:00
Chris Gray
49dcbb2573 Changed Internal representation of quoted string literals to be an instance of \Handlebars\String instead of strangely quoted string. 2014-01-20 09:04:31 -06:00
Chris Gray
1bbe32b56e Updated docblock 2014-01-19 21:06:22 -06:00
Chris Gray
415e642351 Fixed to conform to coding standards 2014-01-17 00:46:39 -06:00
Chris Gray
da1cf77c58 Added string literal support in Context::get and added Template::parseArguments to ease plugin development 2014-01-16 23:28:48 -06:00
behrooz shabani (everplays)
94fbc01217 first part is going to be used, so ignore the rest 2013-12-13 23:09:06 +03:30
behrooz shabani (everplays)
df6ecac7df extracted processing of sections from variable processing 2013-12-13 23:04:31 +03:30
behrooz shabani (everplays)
300f44e8c6 fixed a typo 2013-12-13 22:29:54 +03:30
fzerorubigd
82ea9f958d
add support for inline helper without #
fix #28
2013-12-06 18:00:03 +03:30
fzerorubigd
000bdd6e74
change default helpers to anonymus function again 2013-11-21 23:41:20 +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)
926b4fdc4d no longer Handlerbars_ prefix is being used 2013-11-05 15:36:34 +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
Bouke Versteegh
3d5d44d6d7 Added support for @index in sections: {{#listsection}}, and @key in objects: {{#each object}} 2013-11-01 13:57:00 +01:00
Dan Fellars
c179a4ce9b Converted License from GPLv3 to MIT 2013-10-18 10:07:27 -06:00
webuser
82a9faf3eb add namespace, remove underscores from class names 2013-09-21 15:10:30 -04:00
Behrooz Shabani
8eb732f407 Merge pull request #15 from daviddeutsch/master
Support for context passed into a partial as an argument
2013-07-26 03:17:19 -07:00
David Deutsch
3229ad7c45 Support for context passed into a partial as an argument 2013-07-26 01:27:07 +02:00
fzerorubigd
65eb09d101 Adding Handlebars_String to fix #12
If a helper return a Handlebars_String, then the result is compiled again.
2013-06-01 17:40:45 +04:30
fzerorubigd
c735de8e5b Merge branch 'master' of github.com:XaminProject/handlebars.php
Conflicts:
	src/Handlebars/Template.php
2012-11-29 12:24:45 +03:30
fzerorubigd
8d266bfcd8 return {{^var}} handler 2012-11-29 12:20:49 +03:30
fzerorubigd
ecc1b11f2a fix #4 , NEED TO ADD SOME TESTS ASAP 2012-11-29 10:53:03 +03:30
fzerorubigd
30795180a9 move stop token into stack, fix #3 2012-11-28 12:55:07 +03:30
fzerorubigd
d43d777ce6 change stack position just if there is stop token available 2012-11-19 17:56:10 +03:30
fzerorubigd
4244730d24 fix a bug with stop token (when there is no stop token at all) 2012-11-19 17:35:38 +03:30