php comments as annotations
Posted: Fri Apr 11, 2008 6:57 am
Here is code:
Why returns comments only ones? I change code, save, refresh page -- comments is displayed (page displays: "method doc comment : ' /*** @allow: administrator */"). Refresh again, comments disappears and page displays only: "method doc comment :". Why??
Code: Select all
class MenuController {
/**
* @allow: administrator
*/
public function viewManagementAction() {
$this->view->items = $this->table->fetchAll();
}
}
$method = new ReflectionMethod('MenuController', 'viewManagementAction');
echo 'method doc comment : ' . $method->getDocComment() . '<br /><br />';
Code: Select all
$method->getDocComment()