Note: init in Yaf is understood by default as __construct()
<code>class Order{ private $extend = ''; private $order = ''; public function init(){ parent::init(); $this->order = new Order(); $this->extend = new OrderEx(); } public function listAction(){ $this->order->public(); } public function makeAction(){ $this->extend->public(); } }</code>
any different from the following writing?
<code>class Order{ private $extend = ''; private $order = ''; public function init(){ parent::init(); } public function listAction(){ $order = new Order(); $order->public(); } public function makeAction(){ $extend= new extend(); $extend->public(); } }</code>
I’m a newbie, I hope to have good programming habits, but some basics are not solid, so I hope you can give me some advice