【发布时间】:2010-03-03 09:58:28
【问题描述】:
我在带有静态函数的自定义 Magento 模型中有一个自定义模型:
class ABC_Module_Model_ClassName
{
static public function send ( $something)
{
// do something static
}
}
现在我这样调用函数:
ABC_Module_Model_ClassName::send($something); // works and is nothing wrong with it
出于一致性目的,我想知道 Mage 是否有内部调用静态方法的方式,如下所示:
Mage::getModel('abc/module_className')::send($something); // this is wrong
// or
Mage::getModel('abc/module_className', send($something)); // with a callback or something
【问题讨论】: