Link 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_Link class

__construct(string $linkName, string $caption, string $url, array $urlParameters, bool $displayLink, bool $displayCaption) : void

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

Parameters

$linkName

string

name of link object

$caption

string

text to be displayed

$url

string

url to link to

$urlParameters

array

Array with UrlParameters (objects or name-value)

$displayLink

bool

create link or not (optional, default = true)

$displayCaption

bool

show caption or nothing (optional, default = true)

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 caption

getCaption() : string

Returns

stringCaption

Get HTML string for link

getDisplayString() : string

Returns

stringLink

Returns name of the object

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

Returns

stringobject name

Gets the url

getUrl() : string

Returns

stringUrl path

Checks if object name is empty

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

Returns

booltrue if empty

Sets the caption

setCaption(string $caption) : void

Parameters

$caption

string

Link caption

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 url

setUrl(\Formaid_Url $url, array $urlParameters) : void

Parameters

$url

\Formaid_Url

Url object

$urlParameters

array

Array with UrlParameters (objects or name-value)

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

 

$properties : object
access public
 

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

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

$_caption : object
access private
 

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

$_url : object
access private