2012-06-28 22 views
1
public function getItemsCollection($useCache = true) 
    { 
     if (is_null($this->_items)) { 
      $this->_items = Mage::getModel('sales/quote_item')->getCollection(); 
      $this->_items->setQuote($this); 
     } 
     return $this->_items; 
    } 

在這個範圍內,我怎麼才能找到什麼是初始化_items?這不是我碰到的Magento對象。如何或在哪裏,這個對象被初始化?

回答

1
grep -lir '$this->_items = ' ~/MyProject 
+2

Unix平臺......他們只是一個大的IDE –

+0

不-是壞的答案,但在Magento至少有三種不同的方法來初始化這樣一個變量,它是通過不同的setter函數訪問... – feeela