When you’re using a complex web application like Magento or WordPress it’s a real struggle to remember all the functions, classes and methods that are available to you in the template files. And this means endless trips back to the documentation, trial and error, and other such in-efficiences.
Fortunately you can speed things up a load by manually adding code hints for a variable, which then should bring up code completion hints in any half decent IDE like Eclipse or Netbeans.
/* @var $_product Mage_Catalog_Model_Product */
Of course if it’s a complex object you can end up with an enormous list of methods, then you just have to pray that someone has included decent phpdoc in the Class definition (Magento doesn’t, WordPress does).
Need some help with an e-Commerce solution? Small business looking for inexpensive e-Commerce, or design agency looking for talented freelancer in and around Bath, Bristol, Wiltshire or Somerset? Why not get in touch?