Function : eview

The eview() function means "error view". This function sets the error page displayed when a url returns a 404 error. The default error page by default is loaded from windows/Rex/errors/404.rex.php template file. However, this can be overriden from within routes as shown below:

  <?php 

  ... 

  use Window;

  class Home extends Window {

    function __construct() {

      eview('errors.custom'); //set error page

      self::call($this, 
      
        [
          'home' => 'root'  
        ]

      );

    }

    function root() { }

  }


                  

The example above reflects how to set a custom error page for shutter methods. If the shutter used cannot resolve the url and the shutter was not pended, rather than use the default error page, the custom error page will be assumed. In the sample above, the error template file will be assumed to be in the path windows/Rex/errors/custom.rex.php