Gumbo_Router



Router Class

Author(s): Michael Luster <mluster79@yahoo.com>
License:New BSD License
Copyright:Copyright (c) 2007, iBayou, Michael Luster
Link:http://sourceforge.net/projects/phpgumbo
Version:0.0.1

Implements interfaces:

Class Variables

bool $_active =  false [line 40]
int $_delay =  GUMBO_ROUTER_DELAY [line 43]
bool $_flush =  GUMBO_ROUTER_FLUSH [line 45]
string $_url [line 38]

Class Methods

public Gumbo_Router __construct ( [string $url], [int $delay], [bool $flush] ) [line 56]

Constructor

Parameter(s):

  • (string) $url
  • (int) $delay :: time, in seconds, before routing
  • (bool) $flush :: flushes the buffer before routing
  • postcondition:  $this->activate()

[ Top ]
public void activate ( ) [line 110]

Activates the Router

  • precondition:  getUrl()
  • postcondition:  isActive()
Implementation of:
Gumbo_Interface_Router::activate()

[ Top ]
public void deactivate ( ) [line 119]

Deactivates the Router

  • postcondition:  !isActive()
Implementation of:
Gumbo_Interface_Router::deactivate()

[ Top ]
public int getDelay ( ) [line 211]

Returns the delay time, in seconds

Implementation of:
Gumbo_Interface_Router::getDelay()

[ Top ]
public bool getFlush ( ) [line 219]

Returns if the buffer should be flushed

Implementation of:
Gumbo_Interface_Router::getFlush()

[ Top ]
public string getUrl ( ) [line 203]

Returns the Url

Implementation of:
Gumbo_Interface_Router::getUrl()

[ Top ]
public void go ( ) [line 72]

Jumps to the supplied URL

  • precondition:  isActive ()
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Router::go()

[ Top ]
public bool isActive ( ) [line 227]

Returns if the Router is active

Implementation of:
Gumbo_Interface_Router::isActive()

[ Top ]
public void setDelay ( int $delay ) [line 160]

Sets the delay time, in seconds, before routing

Parameter(s):

  • (int) $delay
  • throws:  Gumbo_Exception
  • precondition:  $delay >= 0
  • precondition:  $delay <= 30
Implementation of:
Gumbo_Interface_Router::setDelay()

[ Top ]
public void setFlush ( bool $val ) [line 182]

Sets the program to flush the buffer before routing

Parameter(s):

  • (bool) $val
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Router::setFlush()

[ Top ]
public void setUrl ( string $url ) [line 133]

Sets the URL to jump to

Parameter(s):

  • (string) $url
  • precondition:  Valid::isUrl ()
  • throws:  Gumbo_Exception
  • uses:  Gumbo_Valid_Web
Implementation of:
Gumbo_Interface_Router::setUrl()

[ Top ]