Packageindex Classtrees Modulegroups Elementlist Report XML Files

Stx_Redirect

Stx_Redirect

private class Stx_Redirect

Since the same match string can be with multiple root nodes (if you use one SyntaxCMS content store on multiple sites. You must set the root section to work with a redirect. If it is empty, most of the functions will return false and display an error. USAGE $redirect = new Stx_Redirect(); $redirect->set_root_section( '_home' ); $redirect->set_match('event_calendar'); if ( $redirect->exists() ) { $url = $redirect->get_target_url(); }

 

Public Method Summary

void Stx_Redirects(string $root)
Constructor
void set_match( $match)
Sets the string used to match in the request uri, the string
void get_match()
Sets the string used to match in the request uri
void set_target_url( $url)
Sets the target URL
void get_target_url()
Gets the target URL
boolean exists()
Tests if a redirect under a root section already exists in the db
boolean load(integer $id)
Attempts to load a redirect given its id
boolean update()
Saves redirect changes to the database
boolean save()
Saves a new redirect info to database.
boolean delete()
Deletes the redirect from the database.

Private Method Summary

void set_root_section(string $root)
Sets the root section to restrict redirects
object [unknown] get_paged_collection(integer $page, integer $rows_per_page)
Returns an AdoDB recordset that is paged
array fetch_next()
Returns the next object in the result set as an array
integer count()
Returns the total number of rows found
integer get_last_page()
Returns the last page number in a paged query
void set_id( $id)
Sets the id

Private Field Summary

unknown $root_section
The root section string (usually the NAV_ROOT_EL for the site) allows
$query
ADOdb recordset
unknown $id
Database id
unknown $match
String to match for redirect
unknown $target_url
Target url (absolute or fully qualified w/http)

Public Method Details

Stx_Redirects

public void Stx_Redirects(string $root)

 

Parameter
string $root
Returns void


set_match

public void set_match( $match)

  is converted to lowercase and matched regardless of case

Parameter
$match
Warning: documentation is missing.
Returns void


get_match

public void get_match()

 

Returns void


set_target_url

public void set_target_url( $url)

 

Parameter
$url
Warning: documentation is missing.
Returns void


get_target_url

public void get_target_url()

 

Returns void


exists

public boolean exists()

 

Returns boolean


load

public boolean load(integer $id)

 

Parameter
integer $id
Returns boolean


update

public boolean update()

 

Returns boolean

, true on success


save

public boolean save()

 

Returns boolean

, true on success


delete

public boolean delete()

 

Returns boolean

, true on success


Private Method Details

set_root_section

private void set_root_section(string $root)

 

Parameter
string $root
Returns void


get_paged_collection

private object [unknown] get_paged_collection(integer $page, integer $rows_per_page)

 

Parameter
integer $page
integer $rows_per_page
Returns object [unknown]


fetch_next

private array fetch_next()

 

Returns array

, false when done


count

private integer count()

 

Returns integer


get_last_page

private integer get_last_page()

 

Returns integer


set_id

private void set_id( $id)

 

Parameter
$id
Warning: documentation is missing.
Returns void


Private Field Details

$root_section

private unknown $root_section

>><<

the same redirect to point to different targets depending on what the root section is set to. This is useful when you have a single syntax database content store feeding multiple site instances.


$query

private $query

>>null<<


$id

private unknown $id

>><<


$match

private unknown $match

>><<


$target_url

private unknown $target_url

>><<



Packageindex Classtrees Modulegroups Elementlist Report XML Files
Generated on Fri, 28 Apr 2006 19:06:12 -0400 by PHPDoc v1.5 www.phpdoc.de