title: How to escape html in Phalcon\Mvc\View
body: <p>I found that view variables in phalcon could be escaped by Phalcon\Escaper: <a href="http://docs.phalconphp.com/en/latest/api/Phalcon_Escaper.html" rel="nofollow">http://docs.phalconphp.com/en/latest/api/Phalcon_Escaper.html</a></p>
  
  <p>For example, in Zend, there is a way to call view helpers from view:</p>
  
  <pre><code>// view context
  $this-&gt;escape($data); // calls View\Helper\Escape
  $this-&gt;url($params); // calls url view helper
  // etc
  </code></pre>
  
  <p>Is there a way to get such view helpers without creating new object every time?
  My current idea is to make some BaseView class, extended from Phalcon\Mvc\View and to define some often-used methods there, that will use cached objects.. but i am not sure that it is the best way:</p>
  
  <pre><code>class BaseView extends Phalcon\Mvc\View
  {
      // cached helper objects
      $helpers = [];
  
      // view helper call
      public function url($params)
      { 
         if (!$this-&gt;helpers['url']) {
             $this-&gt;helpers['url'] = new Phalcon\Mvc\Url();
         }
         return $this-&gt;helpers['url']-&gt;get($params);
      }
  }
  </code></pre>