0
我目前正在重新編碼一些代碼。 這是我現在運行的項目。數組作爲函數參數
class store extends TModel{
public function render_cart($a=0, $b=0, $c=0){
echo '<pre>'; var_dump($a=0, $b=0, $c=0); echo '</pre>';
}
}
class TController extends TObject{
function getModel($model=''){
include(TPATH_COMPONENT.'models'.DS.$model.'.php');
$this->_model = new $model;
return false;
}
function get($method=''){
$args = func_get_args();
return $this->model->$method($args);
}
}
$controller->getModel('store');
$cart = $controller->get('render_cart', 1, 2, 3);
我想從TController轉移ARGS ::獲得存儲:: render_cart($ A = 0,$ B = 0,$ C = 0),因爲它的參數。謝謝你的幫助。