Commit Graph

31 Commits

Author SHA1 Message Date
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
behrooz shabani (everplays)
413585f9ce Added missing copyright notices. fixes #57 2014-03-17 00:58:50 +03:30
fzerorubigd
9c91ea7d64
add another test 2014-02-26 21:13:11 +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
ulriklystbaek
7894899aba Update Context.php
Added author
2014-01-21 09:42:48 +01:00
ulriklystbaek
4e2c869d3b Update Context.php
If the array contains the given key with a null value, the null value should be returned instead of an empty string.
2014-01-21 09:23:54 +01: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
3603a00ee6 Added support for .length as an alias to count on the current context in Context::_findVariableInContext 2014-01-19 21:07:03 -06:00
Chris Gray
415e642351 Fixed to conform to coding standards 2014-01-17 00:46:39 -06:00
Chris Gray
78974dee1b Fixed edge case in Context::get where trim was eating trailing escaped quote in a quoted literal string that ends with an escaped quote 2014-01-17 00:30:14 -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
cgray
1119784549 Update Context::get to resolve @key and @index 2014-01-16 12:41:02 -06:00
fzerorubigd
fa65e99dfe
fix a bug in context when get invalid variable in strict mode 2013-12-06 20:43:51 +03:30
behrooz shabani (everplays)
a4e56e3f60 allow accessing stuff via 0 index, fixes #30 2013-11-19 18:18:32 +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
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
David Deutsch
0451fa2483 Support recursive object traversal
Nested this.property traversal wasn't possible. With this fix, it is.
2013-04-02 13:12:27 +03:00
fzerorubigd
3d8685f179
Add this (for current variable in context) fix #5
Signed-off-by: fzerorubigd <fzerorubigd@gmail.com>
2013-01-19 15:26:51 +03:30
fzerorubigd
d99f9a7830 fix strict mode in context::get 2012-11-10 15:46:26 +03:30
fzerorubigd
e3c2936694 Add support for mustache like each/with and if 2012-11-10 14:44:23 +03:30
behrooz shabani (everplays)
6319950bca we shouldn't compare context with string as __toString will be called 2012-10-29 15:42:42 +03:30
fzerorubigd
2af461c7f6 initial commit 2012-10-25 19:00:10 +03:30