Add an example for anchored dot notation.
This commit is contained in:
@@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Mustache.php.
|
||||||
|
*
|
||||||
|
* (c) 2010-2017 Justin Hileman
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class AnchoredDotNotation
|
||||||
|
{
|
||||||
|
public $genres = array(
|
||||||
|
array(
|
||||||
|
'name' => 'Punk',
|
||||||
|
'subgenres' => array(
|
||||||
|
array(
|
||||||
|
'name' => 'Hardcore',
|
||||||
|
'subgenres' => array(
|
||||||
|
array(
|
||||||
|
'name' => 'First wave of black metal',
|
||||||
|
'subgenres' => array(
|
||||||
|
array('name' => 'Norwegian black metal'),
|
||||||
|
array(
|
||||||
|
'name' => 'Death metal',
|
||||||
|
'subgenres' => array(
|
||||||
|
array(
|
||||||
|
'name' => 'Swedish death metal',
|
||||||
|
'subgenres' => array(
|
||||||
|
array('name' => 'New wave of American metal'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'Thrash metal',
|
||||||
|
'subgenres' => array(
|
||||||
|
array('name' => 'Grindcore'),
|
||||||
|
array(
|
||||||
|
'name' => 'Metalcore',
|
||||||
|
'subgenres' => array(
|
||||||
|
array('name' => 'Nu metal'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{{% ANCHORED-DOT }}
|
||||||
|
{{# genres }}
|
||||||
|
{{> genre }}
|
||||||
|
{{/ genres }}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
- Punk
|
||||||
|
- Hardcore
|
||||||
|
- First wave of black metal
|
||||||
|
- Norwegian black metal
|
||||||
|
- Death metal
|
||||||
|
- Swedish death metal
|
||||||
|
- New wave of American metal
|
||||||
|
- Thrash metal
|
||||||
|
- Grindcore
|
||||||
|
- Metalcore
|
||||||
|
- Nu metal
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{{% ANCHORED-DOT }}
|
||||||
|
- {{ name }}
|
||||||
|
{{# .subgenres }}
|
||||||
|
{{> genre }}
|
||||||
|
{{/ .subgenres }}
|
||||||
Reference in New Issue
Block a user