在NetBeans给magento添加提示方法功能

在 magento中,如果你用getModel得到一个对象时,默认没有方法提示的,可以通过添加一个注释来实现

 $quote = Mage::getModel('sales/quote')
         ->setStoreId(Mage::app()->getStore()->getId());
/* @var $quote Mage_Sales_Model_Quote */

通过var的定义,就可以有自动的方法提示了。

About caker

Welcome to WebCaker. My name is Zhang tongzhu( Nickname : Caker) . I'm 30-year-old, currently working as full time PHP web application developer and learn the iPhone development at same time.
This entry was posted in Magento and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>