TreeFixtureCategoryProxy.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace Gedmo\Tree\Proxies;
  3. /**
  4. * THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
  5. */
  6. class TreeFixtureCategoryProxy extends \Tree\Fixture\Category implements \Doctrine\ORM\Proxy\Proxy
  7. {
  8. private $_entityPersister;
  9. private $_identifier;
  10. public $__isInitialized__ = false;
  11. public function __construct($entityPersister, $identifier)
  12. {
  13. $this->_entityPersister = $entityPersister;
  14. $this->_identifier = $identifier;
  15. }
  16. private function _load()
  17. {
  18. if (!$this->__isInitialized__ && $this->_entityPersister) {
  19. $this->__isInitialized__ = true;
  20. if ($this->_entityPersister->load($this->_identifier, $this) === null) {
  21. throw new \Doctrine\ORM\EntityNotFoundException();
  22. }
  23. unset($this->_entityPersister, $this->_identifier);
  24. }
  25. }
  26. public function getId()
  27. {
  28. $this->_load();
  29. return parent::getId();
  30. }
  31. public function setTitle($title)
  32. {
  33. $this->_load();
  34. return parent::setTitle($title);
  35. }
  36. public function getTitle()
  37. {
  38. $this->_load();
  39. return parent::getTitle();
  40. }
  41. public function setParent(\Tree\Fixture\Category $parent)
  42. {
  43. $this->_load();
  44. return parent::setParent($parent);
  45. }
  46. public function getParent()
  47. {
  48. $this->_load();
  49. return parent::getParent();
  50. }
  51. public function __sleep()
  52. {
  53. return array('__isInitialized__', 'id', 'title', 'lft', 'rgt', 'parentId', 'level', 'children', 'comments');
  54. }
  55. }