php - How do I generate a phpdoc for slim framework routes / callbacks -


i'm struggling figure out how can structure code such phpdocumentor make use of code blocks.

/**  * -- book, either filtered id or full list.  *  * @param   slimapplication     $app    application object instance.  * @param   integer             $id id of book  */ $callbackfunction = function($id) use ($app) {     //some functionality here. }; $app->get('/books(/:id)', $callbackfunction ); 

i should continue use inline use statement can use $app.

anyone have suggestions?

phpdocumentor has no special syntax document anonymous function that. if want document closure itself, you'd need define first class function, , can document such.

if knowing closure exists , details need known documentation reader, presumably it's important enough first class function? again, being closure, it's not available on code's api... need documented?


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -