什么是PHP模板中的twig模板表单action = {{path('page')}}的等价物

I'm doing a project for a client and most of the templating is already page.html.php templates, I'm used to twig, I haven't found this info anywhere but how would you do the same below for a php template.

 <form method=post action={{path('page')}}>

I tried

 action=$views['routes']->generate('page');  

but this does nothing, it works for links fine.

What's the correct way?

Thanks

<?php echo $view['router']->generate('page') ?>

Documentation is here: http://symfony.com/doc/current/book/routing.html#generating-urls-from-a-template