phpdocumentor2 - How to document a controller in symfony? -
i'm trying document project. want document controller. before action have:
/** * description: xxx * @param parameters of function action * @return views of action */ the return value here show:
why?
thanks
edit:
a standard controller:
public function mycontrolleraction(request $request) { return $this->render('appbundle:default:index.html.twig'); }
the @return annotation expects data type first argument, before description. in case you've specified data type views hasn't been included use statement, php assumes belongs current namespace , \appbundle\controllers\views. return type of controller must symfony\component\httpfoundation\response. want:
@return \symfony\component\httpfoundation\response description or if have use statement response:
@return response description in cases might want more specific if returning specific subclass of response, like:

Comments
Post a Comment