Class URLWriter

Description

The purpose of a URLWriter is to generate URLs from contextual data. This data would be the current/target module and action, any contextual name=value pairs specified by the code, and any additional query data.

Located in /harmoni/core/architecture/request/URLWriter.abstract.php (line 16)

SObject
   |
   --URLWriter
Direct descendents
Class Description
GETMethodURLWriter The purpose of a URLWriter is to generate URLs from contextual data. This data would be the current/target module and action, any contextual name=value pairs specified by the code, and any additional query data.
PathInfoURLWriter The purpose of a URLWriter is to generate URLs from contextual data. This data would be the current/target module and action, any contextual name=value pairs specified by the code, and any additional query data.
Variable Summary
mixed $_action
mixed $_module
mixed $_vars
Method Summary
URLWriter URLWriter ()
void batchSetValues (array $array)
void redirectBrowser ()
void setModuleAction (string $module, string $action)
void setValue (string $key, string $value)
void setValues (array $array)
string write ()
Variables
mixed $_action (line 21)
mixed $_module (line 20)
mixed $_vars (line 22)
Methods
Constructor URLWriter (line 24)
URLWriter URLWriter ()
batchSetValues (line 50)

Takes an associative array of name/value pairs and sets the internal data to those values. The method is used internally by the RequestContext only and should not be called otherwise.

  • access: private
void batchSetValues (array $array)
  • array $array
redirectBrowser (line 87)

Calls RequestContext::locationHeader with this URL.

void redirectBrowser ()
setModuleAction (line 37)

Sets the module and action to request in this URL.

  • access: public
void setModuleAction (string $module, string $action)
  • string $module
  • string $action
setValue (line 77)

Sets a single value in the internal data.

  • access: public
void setValue (string $key, string $value)
  • string $key
  • string $value
setValues (line 64)

Takes an associative array of name/value pairs and sets the internal data to those values, replacing any values that already exist.

  • access: public
void setValues (array $array)
  • array $array: An associative array.
write (line 107)

The following function has many forms, and due to PHP's lack of

method overloading they are all contained within the same class method. Any keys/names for paremeters should be translated into their contextual equivalents by contacting the RequestContext object.

write() write(array $vars) write(string $key1, string $value1, [string $key2, string $value2, [...]])

  • return: The URL.
  • access: public
string write ()

Redefined in descendants as:
  • GETMethodURLWriter::write() : The following function has many forms, and due to PHP's lack of method overloading they are all contained within the same class method.
  • PathInfoURLWriter::write() : The following function has many forms, and due to PHP's lack of method overloading they are all contained within the same class method.

Inherited Methods

Inherited From SObject

SObject::asA()
SObject::asString()
SObject::copy()
SObject::copySameFrom()
SObject::copyTwoLevel()
SObject::deepCopy()
SObject::isEqual()
SObject::isEqualTo()
SObject::isNotEqualTo()
SObject::isNotReferenceTo()
SObject::isReferenceTo()
SObject::newFrom()
SObject::postCopy()
SObject::printableString()
SObject::shallowCopy()
SObject::_deepCopyArray()

Documentation generated on Wed, 19 Sep 2007 10:27:38 -0400 by phpDocumentor 1.3.0RC3