我想通过将不同类中的动作分开来制作一个模块化控制器。
问题是一些动作正在调用控制器的私有函数。  
控制器 :
class ApiController extends Controller
{
    public function actions()
    {
        return array(
            'index'=>'application.controllers.api.IndexAction',
        );
    }
    ..........
    private function _sendResponse($status = 200, $body = '', $content_type = 'text/html')
    {
        // some code
    }
}  
在 IndexAction.php 我试过这样,但不起作用:
class IndexAction extends CAction
{
    public function run()
    {
            $this->getController()->_sendResponse(204); //this error
    }
}
例外是
ApiController and its behaviors do not have a method or closure named "_sendResponse".  
这可能是我想要做的吗?
我在这里错过了什么吗?