Added double section, escaped output, utf8 escaped and utf8 unescaped examples.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
class DoubleSection extends Mustache {
|
||||
public function t() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public $two = "second";
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{{#t}}
|
||||
* first
|
||||
{{/t}}
|
||||
* {{two}}
|
||||
{{#t}}
|
||||
* third
|
||||
{{/t}}
|
||||
@@ -0,0 +1,3 @@
|
||||
* first
|
||||
* second
|
||||
* third
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
class Escaped extends Mustache {
|
||||
public $title = "Bear > Shark";
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<h1>{{title}}</h1>
|
||||
@@ -0,0 +1 @@
|
||||
<h1>Bear > Shark</h1>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
class UTF8Unescaped extends Mustache {
|
||||
public $test = '中文又来啦';
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<h1>中文 {{test}}</h1>
|
||||
@@ -0,0 +1 @@
|
||||
<h1>中文 中文又来啦</h1>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
class UTF8 extends Mustache {
|
||||
public $test = '中文又来啦';
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<h1>中文 {{{test}}}</h1>
|
||||
@@ -0,0 +1 @@
|
||||
<h1>中文 中文又来啦</h1>
|
||||
Reference in New Issue
Block a user