That is not the good design, You do not do any logic in your controller, instead delegate all of them to some other component class(It is commonly known as Service layer)
Class PostController extends Controller{
private SerachComponent serachComponent;
publuc function actionCreate(){
Object o = serachComponent.create();
$this->render("", o) ;
}
}
Class SearchController extends Controller{
publuc function actionSearch(){
Object o = serachComponent.create();
$this->render("", o) ;
}
}
I highly suggest you to call PostController instead of Post. Post is kind a entity class and it should be Model.
do not make your controller fat with logic, instead delegate some other components, so you can use the component in any place. Never call controller method from another place, It is not intended for this purpose.