我想知道是否可以在View Helper中使用多重函數?比方說,我有這樣的視圖助手:Zend Framework在視圖幫助器中使用多重函數
class Zend_View_Helper_Time extends Zend_View_Helper_Abstract {
public function time($date) {
// Some code here
}
}
在我看來,我會使用它這樣:
$this->time($some_date);
但是,如果我想,在相同的助手能夠叫什麼另一種方法,如:
$this->Time->convertMyDate($some_date);
我試圖做到這一點,但不幸的是我有一個錯誤。我們鎖定在類名後面只使用方法名嗎?
感謝您的幫助