Whitespace.php 787 B

12345678910111213141516171819202122232425262728293031323334
  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. {
  12. public $foo = 'alpha';
  13. public $bar = 'beta';
  14. public function baz()
  15. {
  16. return 'gamma';
  17. }
  18. public function qux()
  19. {
  20. return array(
  21. array('key with space' => 'A'),
  22. array('key with space' => 'B'),
  23. array('key with space' => 'C'),
  24. array('key with space' => 'D'),
  25. array('key with space' => 'E'),
  26. array('key with space' => 'F'),
  27. array('key with space' => 'G'),
  28. );
  29. }
  30. }