What does $this refer to in magento's actions?
I'm looking at this file:
https://github.com/magentomirror/magento-mirror/blob/开发者_运维技巧magento-1.5/app/code/core/Mage/Catalog/controllers/ProductController.php
what does:
$this
and
$this->
refer to?
It refers to the object "Mage_Catalog_ProductController
" in that case. "$this
" refers to the current object, so it's relative to which class it's called from.
PHP Manual for OOP
精彩评论