3.5.2.12. Redirection

File: classes/Redirection.php
The Preferences class provides support for preferences. Preferences are organized by site, name, item, and index. Name is alphanumeric while item and index are numeric.

3.5.2.12.1. add_redirection
Format: result = add_redirection(site,root,type,path)
where "site" is the site, "root" is the path to redirect from, "name" is the the preference name, "type" is the redirection type, and "path" is the path to redirect to.
Example: $result = $redir->add_redirection($site,$root,$type,$path);

This method adds a redirection for the specified site. The type is one of the following:

3.5.2.12.2. delete
Format: result = delete(id)
where "id" is the redirection ID to delete.
Example: $result = $redir->delete($id);

This method deletes the specified redirection entry.

3.5.2.12.3. get_redirections
Format: result = get_redirections(site)
where "site" is the site whose redirections to return.
Example: $result = $redir->get_redirections($site);

This method returns an array of redirections for the given site.

3.5.2.12.4. resolve_redirection($site,$root)
Format: result = resolve_redirection(site,root)
where "site" is the site whose redirections to return.
Example: $result = $redir->resolve_redirection($site,$root);

This method returns an array of redirections for the given site.