<h1>Hello, <?=$user?>!</h1>
$view = new View('view.php');
$view->assign('user', $user->name);
echo $view->render();
class SomePage extends View
{
/**
* Current user name.
* @var string
*/
public $user;
}
$view = SomePage();
$view->user = $user->name;
echo $view->render();
@property
:/**
* @property string user
*/
class SomePage extends View {
}