complex.php 677 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /*
  3. * This file is part of Mustache.php.
  4. *
  5. * (c) 2010-2017 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. class Complex
  11. {
  12. public $header = 'Colors';
  13. public $item = array(
  14. array('name' => 'red', 'current' => true, 'url' => '#Red'),
  15. array('name' => 'green', 'current' => false, 'url' => '#Green'),
  16. array('name' => 'blue', 'current' => false, 'url' => '#Blue'),
  17. );
  18. public function notEmpty()
  19. {
  20. return !($this->isEmpty());
  21. }
  22. public function isEmpty()
  23. {
  24. return count($this->item) === 0;
  25. }
  26. }