Whitespace.php 998 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /*
  3. * This file is part of Mustache.php.
  4. *
  5. * (c) 2010-2016 Justin Hileman
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. /**
  11. * Whitespace test for tag names.
  12. *
  13. * Per http://github.com/janl/mustache.js/issues/issue/34/#comment_244396
  14. * tags should strip leading and trailing whitespace in key names.
  15. *
  16. * `{{> tag }}` and `{{> tag}}` and `{{>tag}}` should all be equivalent.
  17. */
  18. class Whitespace
  19. {
  20. public $foo = 'alpha';
  21. public $bar = 'beta';
  22. public function baz()
  23. {
  24. return 'gamma';
  25. }
  26. public function qux()
  27. {
  28. return array(
  29. array('key with space' => 'A'),
  30. array('key with space' => 'B'),
  31. array('key with space' => 'C'),
  32. array('key with space' => 'D'),
  33. array('key with space' => 'E'),
  34. array('key with space' => 'F'),
  35. array('key with space' => 'G'),
  36. );
  37. }
  38. }