2011-05-20 34 views
0

我是新來的Symfony 1.4

我有一個插件和模塊文件夾中我有payment模塊,爲此,我有的lib文件夾模板文件夾。在LIB我有BasePaymentComponents.class.php類,並在這個類,我有一些函數調用以這種方式前綴executeSometing

public function executeSometing(sfWebRequest $request) 

的每個執行我在模板文件夾特定的模板。文件結構是這樣的:_something1.php,_something2.php ...

我的問題是在什麼時候BasePaymentComponents.class.php函數executeSometing實際執行?

我創造了另一個模板,命名爲_something3.php併爲他設定的功能:

public function executeSometing3(sfWebRequest $request) 

實際上不是在啓動該功能。爲什麼?

回答

5

您正在使用的組件 - 組件添加到模板 - 這樣執行的東西方法在BasePayment組件將添加以下到您的模板:

<?php include_component('BasePayment', 'something') ?> 

檢查文檔在這裏 - >Inside the view layer < - 更多信息