Extends FuelPHP view class and provides new functionalities.
Same specifications as in FuelPHP view class, except when you prefix the view name by !, view redirections are ignored.
Parameters: |
|
---|
The function can redirect views: you can, for instance, make View::forge(‘a’) return the content of view b.
Usages examples:
<?php
View::redirect('a', 'b'); // redirects view `a` to `b`
View::redirect('a', 'b', function($data, $filter) { return false; }); // won't have any effect
View::redirect('a', 'b', function($data, $filter) { return false; });
View::redirect('a', 'c', function($data, $filter) { return true; });
// will redirect `a` to `c`
View::redirect('a', false, function($data, $filter) { return 'd'; })
// or
View::redirect('a', function($data, $filter) { return 'd'; })
// will redirect `a` to `d`