Page 1 of 1

php comments as annotations

Posted: Fri Apr 11, 2008 6:57 am
by demi
Here is code:

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 />';
 
Why

Code: Select all

$method->getDocComment()
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??