In my controller I have code like this:
public function showStudent($id)
{
$student = new Student();
$student->loadFromId($id);
/* call the view */
include '/path/to/student/view.php';
}
In the view.php file I want my code editor (netbeans, of course) to know $student is an instance of the Student class so it can suggest and check methods and properties etc. Can I help the editor to know this with an annotation, like
<?php
/**
* @magic Student $student
*/
?>
<html>
....
<p>Good day, <?= $student->name; ?></p>
</html>