complex.php 466 B

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