PHP Class Redirect, huge

Inheritance: extends CI_Model
Show file Open project: panique/huge Class Usage Examples

Public Methods

Method Description
home ( ) To the homepage
to ( $path ) To the defined page, uses a relative path (like "user/profile")
toPreviousViewedPageAfterLogin ( $path ) To the last visited page before user logged in (useful when people are on a certain page inside your application and then want to log in (to edit or comment something for example) and don't to be redirected to the main page).

Method Details

home() public static method

To the homepage
public static home ( )

to() public static method

Redirects to a RELATIVE path, like "user/profile" (which works very fine unless you are using HUGE inside tricky sub-folder structures)
See also: https://github.com/panique/huge/issues/770
See also: https://github.com/panique/huge/issues/754
public static to ( $path )
$path string

toPreviousViewedPageAfterLogin() public static method

This is just a bulletproof version of Redirect::to(), redirecting to an ABSOLUTE URL path like "http://www.mydomain.com/user/profile", useful as people had problems with the RELATIVE URL path generated by Redirect::to() when using HUGE inside sub-folders.
public static toPreviousViewedPageAfterLogin ( $path )
$path string