Skip to content

Commit 6ebfbb4

Browse files
committed
Temp todos
1 parent 2c55b09 commit 6ebfbb4

2 files changed

Lines changed: 39 additions & 11 deletions

File tree

test.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
use DevTheorem\Handlebars\Handlebars;
4+
5+
require 'vendor/autoload.php';
6+
7+
$templateStr = <<<VAREND
8+
{{#each table as |value key|}}
9+
KEY: {{dump key}}
10+
VAL: {{dump value}}
11+
{{/each}}
12+
VAREND;
13+
14+
$helpers = [
15+
'dump' => fn($x) => var_export($x, true),
16+
];
17+
18+
$template = Handlebars::compile($templateStr);
19+
20+
$data = [
21+
'table' => ['foo' => 'bar'],
22+
];
23+
24+
echo $template($data, ['helpers' => $helpers]);

todo.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,21 @@ Double-check every LightnCandy issue where I left a comment, to see if any need
88
- [x] https://github.com/zordius/lightncandy/issues/346
99
- [x] https://github.com/zordius/lightncandy/issues/345
1010
- [x] https://github.com/zordius/lightncandy/issues/341
11-
12-
13-
Comment with fixed after release:
14-
- https://github.com/zordius/lightncandy/issues/292
11+
- [x] https://github.com/zordius/lightncandy/issues/318
12+
- [ ] https://github.com/zordius/lightncandy/issues/312 - maybe comment with PHP Handlebars example?
13+
- [ ] https://github.com/zordius/lightncandy/issues/299 - Comment with PHP Handlebars example.
14+
- [ ] https://github.com/zordius/lightncandy/issues/297
15+
- [ ] https://github.com/zordius/lightncandy/issues/296 - comment with example of dynamically loading in PHP Handlebars 1.1.
16+
- [ ] https://github.com/zordius/lightncandy/issues/294
17+
- [ ] https://github.com/zordius/lightncandy/issues/293
18+
- [ ] https://github.com/zordius/lightncandy/issues/292 - Comment with fixed after releasing v1.1.0 (see below)
19+
- [ ] https://github.com/zordius/lightncandy/issues/266 - investigate later
20+
- [ ] https://github.com/zordius/lightncandy/issues/242 - comment that simpler in PHP Handlebars
21+
- [ ] https://github.com/zordius/lightncandy/issues/228 - Comment with note about first-class callable syntax
22+
23+
- [ ] https://github.com/devtheorem/php-handlebars/issues/5 mention in commit when resolving, comment after v1.1 release
24+
25+
For issue 292:
1526

1627
Nested partials are fully supported, both at compile and render time in [PHP Handlebars](https://github.com/devtheorem/php-handlebars):
1728

@@ -68,10 +79,3 @@ echo $templateWithPartials(null, ['partials' => $compiledPartials]) . " (runtime
6879
Output:
6980
> { ( [ « < Hello > World! » ] ) } (compile time)
7081
> { ( [ « < Hello > World! » ] ) } (runtime)
71-
72-
73-
- Support callable for helper functions: https://github.com/zordius/lightncandy/issues/228
74-
75-
76-
[Unable to resolve partial when using sub-expression and partial resolver](https://github.com/devtheorem/php-handlebars/issues/5)
77-
- Maybe comment with approach using helper rather than partial?

0 commit comments

Comments
 (0)