complex.php 423 B

12345678910111213141516171819
  1. <?php
  2. class Complex extends Mustache {
  3. public $header = 'Colors';
  4. public $item = array(
  5. array('name' => 'red', 'current' => true, 'url' => '#Red'),
  6. array('name' => 'green', 'current' => false, 'url' => '#Green'),
  7. array('name' => 'blue', 'current' => false, 'url' => '#Blue'),
  8. );
  9. public function notEmpty() {
  10. return !($this->isEmpty());
  11. }
  12. public function isEmpty() {
  13. return count($this->item) === 0;
  14. }
  15. }