Hoa central
Generic.php
Go to the documentation of this file.
1 <?php
2 
37 namespace Hoa\Tree\Visitor;
38 
47 abstract class Generic
48 {
54  const PRE_ORDER = 0;
55 
61  const IN_ORDER = 1;
62 
68  const POST_ORDER = 2;
69 
75  protected $_order = self::PRE_ORDER;
76 
77 
78 
86  public function __construct($order = self::PRE_ORDER)
87  {
88  $this->setOrder($order);
89 
90  return;
91  }
92 
100  protected function setOrder($order)
101  {
102  $old = $this->_order;
103  $this->_order = $order;
104 
105  return $old;
106  }
107 
113  public function getOrder()
114  {
115  return $this->_order;
116  }
117 }
__construct($order=self::PRE_ORDER)
Definition: Generic.php:86