Url class

This class provides the most basic object : - it has a name - and an encoding

category Core
package Formaid
author Dieter Adriaenssens
copyright 2006-2013 Dieter Adriaenssens
license GPL
link http://formaid.sourceforge.net/

 Methods

Constructor, initialises an instance of Formaid_Url class

__construct(string $url_name, string $path) : void

Sets encoding to be used, and set name of the object

Parameters

$url_name

string

Url name

$path

string

Url path name

Add URL parameter

addUrlParameter(object $urlParameter) : void

Parameters

$urlParameter

object

Url parameter object

Add URL parameters as array.

addUrlParameters(array $urlParameters) : void

It takes both value-key pair arrays (parameter name and value) as well as an array of UrlParameter instances.

Parameters

$urlParameters

array

UrlParameter names and values, or objects

Disables trimming whitespace of object name

disableTrimName() : void
Inherited
inherited_from \Formaid_Object::disableTrimName()

Display object

display() : void
Inherited

The name of the object is printed to stdout.

inherited_from \Formaid_Object::display()

Enables trimming whitespace of object name

enableTrimName() : void
Inherited
inherited_from \Formaid_Object::enableTrimName()

Gets the anchor

getAnchor() : string

Returns

stringAnchor name

return Display string

getDisplayString() : string
Inherited
inherited_from \Formaid_Object::getDisplayString()

Returns

stringformatted object string

Returns name of the object

getName() : string
Inherited
inherited_from \Formaid_Object::getName()

Returns

stringobject name

Gets the path

getPath() : string

Returns

stringPath

Get URL

getUrl() : string

Returns

stringUrl

Checks if URL is empty

isEmpty() : bool

Returns

booltrue if URL is empty

Checks if object name is empty

isNameEmpty() : bool
Inherited
inherited_from \Formaid_Object::isNameEmpty()

Returns

booltrue if empty

Sets an anchor

setAnchor(string $anchor) : void

Parameters

$anchor

string

Anchor name

Sets new name for the object

setName(string $new_name) : void
Inherited
inherited_from \Formaid_Object::setName()

Parameters

$new_name

string

new name

Sets the path

setPath(string $path) : void

Parameters

$path

string

Path name

Show object

show() : void
Inherited

The name of the object is printed to stdout.

inherited_from \Formaid_Object::show()

Returns name formatted for displaying

getDisplayName() : string
Inherited
inherited_from \Formaid_Object::getDisplayName()

Returns

stringformatted object name

 Properties

 

$encoding : string
Inherited
access protected
inherited_from \Formaid_Object::$$encoding
 

$name : string
Inherited
access protected
inherited_from \Formaid_Object::$$name
 

$_anchor : object
access private
 

$_path : object
access private
 

$_trimName : bool
Inherited
access private
inherited_from \Formaid_Object::$$_trimName
 

$_urlParameters : object
access private