Whitespace.php 680 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Whitespace test for tag names.
  4. *
  5. * Per http://github.com/janl/mustache.js/issues/issue/34/#comment_244396
  6. * tags should strip leading and trailing whitespace in key names.
  7. *
  8. * `{{> tag }}` and `{{> tag}}` and `{{>tag}}` should all be equivalent.
  9. */
  10. class Whitespace {
  11. public $foo = 'alpha';
  12. public $bar = 'beta';
  13. public function baz() {
  14. return 'gamma';
  15. }
  16. public function qux() {
  17. return array(
  18. array('key with space' => 'A'),
  19. array('key with space' => 'B'),
  20. array('key with space' => 'C'),
  21. array('key with space' => 'D'),
  22. array('key with space' => 'E'),
  23. array('key with space' => 'F'),
  24. array('key with space' => 'G'),
  25. );
  26. }
  27. }