item.class.php 864 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * The common item element class file of zin of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2023 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
  6. * @author Hao Sun <sunhao@easycorp.ltd>
  7. * @package zin
  8. * @version $Id
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. require_once __DIR__ . DS . 'node.class.php';
  13. require_once __DIR__ . DS . 'zin.func.php';
  14. class item extends node
  15. {
  16. /**
  17. * @return mixed[]|\zin\node|\zin\directive
  18. */
  19. public function build()
  20. {
  21. if($this->parent instanceof node && method_exists($this->parent, 'onBuildItem'))
  22. {
  23. return call_user_func(array($this->parent, 'onBuildItem'), $this);
  24. }
  25. return parent::build();
  26. }
  27. }
  28. function item()
  29. {
  30. return new item(func_get_args());
  31. }