Vitex Software's Ease Html

OutputTag extends PairTag
in package

An object designed to "hold" content - not visible itself.

Tags
author

Vítězslav Dvořák info@vitexsoftware.cz, Jana Viktorie Borbina jana@borbina.com

HTML5 output tag.

Table of Contents

$allItems  : array<string|int, mixed>
Array of links to all embedded objects.
$cssProperties  : array<string|int, mixed>
the field from which the contents of the STYLE tag are rendered.
$drawStatus  : bool
Has the page already been rendered ?
$lastItem  : object
A link to the last element added.
$logType  : string
Do not log HTML object events.
$pageClosed  : bool
Is page closed for adding new contents?
$pageParts  : array<string|int, mixed>
Array of objects and fragments to draw.
$raiseItems  : array<string|int, mixed>
Which objects to take over from the accepting object.
$setName  : bool
Should the object automatically fulfill the name property?
$tagName  : string
Tag name - is also used as an object name.
$tagProperties  : array<string|int, mixed>
Tag property fields.
$trail  : string
Trailing for xhtml.
$webPage  : WebPage
A link to the base object of the page.
$finalized  : bool
Is class finalized ?
$embedName  : string|null
$instance  : mixed
Saves object instance (singleton...).
$tagType  : string
Tag type - e.g. A or STRONG.
__construct()  : mixed
Defines the result of a calculation.
__toString()  : string
Render Obect (and its contents) as string.
addAsFirst()  : mixed
Inserts as the first element in the object.
addCSS()  : bool
Add another CSS definition to stack.
addItem()  : mixed
Include next element into current object.
addItemCustom()  : mixed
Inserts another element into the object.
addItems()  : array<string|int, mixed>
Insert an array of elements.
addJavaScript()  : int
Inserts JavaScript into the page.
addNextTo()  : Embedable|string
Inserts another element after the existing one.
addTagClass()  : void
Adds tag class.
addToLastItem()  : null|Container
Adds an item to the last inserted item.
afterAdd()  : void
Method executed after adding object into new one.
arrayToUrlParams()  : mixed
Returns fields as URL parameters.
cssPropertiesToString()  : string
Returns Css parameters as a string.
draw()  : string
Recursive draw object and its contents.
drawAllContents()  : void
It recursively scans all inserted objects and calls their draw ().
drawIfNotDrawn()  : void
Draw contents not drawn yet.
embedablize()  : Embedable
Always returns Embedable item.
emptyContents()  : void
Empty container contents.
finalize()  : void
Method executed before rendering.
getContents()  : mixed
Contents.
getFirstPart()  : mixed
Returns the first inserted item.
getGetValue()  : string
Returns the value of the page key parameter.
getItemsCount()  : int
Returns number of enclosed items in current or given object.
getPostValue()  : mixed
Returns the value of the page key parameter.
getRendered()  : string
Returns the rendered contents of objects.
getRequestValue()  : mixed
Returns the value of the page call parameter key.
getRequestValues()  : array<string|int, mixed>
Returns $_REQUEST field.
getTagClass()  : mixed
Returns tags css class.
getTagID()  : string
Returns taga html ID.
getTagName()  : string
Returns the name of the tag.
getTagProperty()  : string
Returns property tag value.
getTagType()  : string
Returns tag type.
getUri()  : string
Returns the desired address.
includeCss()  : bool
Include an CSS file call into page.
includeJavaScript()  : string
Includes Javascript into the page.
isEmpty()  : bool
Is the element empty?
isFinalized()  : bool
Returns the status of the part finalization of the flag.
isFormPosted()  : bool
Was the page displayed after the form was submitted using the POST method?
isPosted()  : bool
Is page called by Form Post ?
lastItem()  : Brick|mixed
Vrací odkaz na poslední vloženou položku.
makePagePublic()  : bool
Open Previously closed Web Page.
onlyForLogged()  : bool
Redirects the unlogged-in user to the login page.
phpSelf()  : string
Returns the current URL. This is instead of PHP_SELF which is unsafe.
redirect()  : void
Perform http redirect.
registerItem()  : void
Registers the item for finalization.
sanitizeAsType()  : mixed
It treats the transformation according to its expected type.
setEmbedName()  : bool
Notify component about its embed name.
setFinalized()  : void
Set label of parts finalized.
setObjectName()  : string
Sets ObjectName.
setTagClass()  : void
Sets tag class.
setTagCss()  : void
Sets Css parameters.
setTagID()  : string
Sets the tag specified by the id, or randomly generated.
setTagName()  : void
Name tag settings. Unused .
setTagProperties()  : bool
Sets tag parameters.
setTagProperty()  : bool
Sets tag property to given value.
setTagType()  : void
Sets up tag type.
singleton()  : WebPage
suicide()  : mixed
Allows an already inserted object to be removed from the tree for rendering.
tagBegin()  : void
Show pair tag begin.
tagEnclousure()  : void
Show pair tag ending.
tagPropertiesToString()  : string
Returns tag parameters as a string.
webPage()  : WebPage
Returns or registers an instance of a Web page.

Properties

$allItems

Array of links to all embedded objects.

public static array<string|int, mixed> $allItems = []

of pointers to all items to be rendered

$cssProperties

the field from which the contents of the STYLE tag are rendered.

public array<string|int, mixed> $cssProperties = []

$drawStatus

Has the page already been rendered ?

public bool $drawStatus = false

$lastItem

A link to the last element added.

public object $lastItem

$logType

Do not log HTML object events.

public string $logType = 'none'

$pageClosed

Is page closed for adding new contents?

public static bool $pageClosed = false

$pageParts

Array of objects and fragments to draw.

public array<string|int, mixed> $pageParts = []

$raiseItems

Which objects to take over from the accepting object.

public array<string|int, mixed> $raiseItems = ['SetUpUser' => 'User', 'webPage', 'OutputFormat']

$setName

Should the object automatically fulfill the name property?

public bool $setName = false

$tagName

Tag name - is also used as an object name.

public string $tagName = ''

$tagProperties

Tag property fields.

public array<string|int, mixed> $tagProperties = []

$trail

Trailing for xhtml.

public string $trail = ' /'

$webPage

A link to the base object of the page.

public static WebPage $webPage

$finalized

Is class finalized ?

protected bool $finalized = false

$embedName

private string|null $embedName = null

$instance

Saves object instance (singleton...).

private static mixed $instance

$tagType

Tag type - e.g. A or STRONG.

private string $tagType = ''

Methods

__construct()

Defines the result of a calculation.

public __construct([mixed $content = null ][, array<string|int, mixed> $properties = [] ]) : mixed
Parameters
$content : mixed = null

items included

$properties : array<string|int, mixed> = []

output tag properties

Return values
mixed

__toString()

Render Obect (and its contents) as string.

public __toString() : string
Return values
string

addAsFirst()

Inserts as the first element in the object.

public addAsFirst(mixed $pageItem[, string $pageItemName = null ]) : mixed
Parameters
$pageItem : mixed

value or EaseObject with draw () method

$pageItemName : string = null

Under this name, object is inserted into the tree

Return values
mixed

A link to the embedded object

addCSS()

Add another CSS definition to stack.

public addCSS(string $css) : bool
Parameters
$css : string

css definition

Return values
bool

addItem()

Include next element into current object.

public addItem(Embedable|string $pageItem) : mixed
Parameters
$pageItem : Embedable|string

value or EaseClass with draw() method

Return values
mixed

Pointer to included object

addItemCustom()

Inserts another element into the object.

public static addItemCustom(Embedable|string $pageItem, Embedable $context) : mixed
Parameters
$pageItem : Embedable|string

value or EaseObject with draw () method

$context : Embedable

Object into which elements / items are inserted

Return values
mixed

Pointer to embed object

addItems()

Insert an array of elements.

public addItems(array<string|int, mixed> $itemes) : array<string|int, mixed>
Parameters
$itemes : array<string|int, mixed>

value field or EaseObject with draw () method

Return values
array<string|int, mixed>

inserted items

addJavaScript()

Inserts JavaScript into the page.

public addJavaScript(string $javaScript[, string $position = '0' ][, bool $inDocumentReady = true ]) : int
Parameters
$javaScript : string

JS code

$position : string = '0'

final position: '+','-','0','--',...

$inDocumentReady : bool = true

to insert into a DocumentReady block?

Return values
int

addNextTo()

Inserts another element after the existing one.

public addNextTo(mixed $pageItem) : Embedable|string
Parameters
$pageItem : mixed

value or EaseObject with draw () method

Return values
Embedable|string

a link to the embedded object

addTagClass()

Adds tag class.

public addTagClass(string $className) : void
Parameters
$className : string

jméno css třídy

Return values
void

addToLastItem()

Adds an item to the last inserted item.

public addToLastItem(object $pageItem) : null|Container
Parameters
$pageItem : object

value or EaseObject with draw () method

Return values
null|Container

success

afterAdd()

Method executed after adding object into new one.

public afterAdd() : void
Return values
void

arrayToUrlParams()

Returns fields as URL parameters.

public static arrayToUrlParams(array<string|int, mixed> $params[, string $baseUrl = '' ]) : mixed
Parameters
$params : array<string|int, mixed>
$baseUrl : string = ''
Return values
mixed

cssPropertiesToString()

Returns Css parameters as a string.

public cssPropertiesToString([array<string|int, mixed>|string $cssProperties = null ]) : string
Parameters
$cssProperties : array<string|int, mixed>|string = null

parameter feild, or CSS definition

Return values
string

draw()

Recursive draw object and its contents.

public draw() : string
Return values
string

Empty string

drawAllContents()

It recursively scans all inserted objects and calls their draw ().

public drawAllContents() : void
Return values
void

drawIfNotDrawn()

Draw contents not drawn yet.

public drawIfNotDrawn() : void
Return values
void

embedablize()

Always returns Embedable item.

public static embedablize(mixed $item) : Embedable
Parameters
$item : mixed
Return values
Embedable

emptyContents()

Empty container contents.

public emptyContents() : void
Return values
void

finalize()

Method executed before rendering.

public finalize() : void
Return values
void

getContents()

Contents.

public getContents() : mixed
Return values
mixed

getFirstPart()

Returns the first inserted item.

public getFirstPart() : mixed
Return values
mixed

getGetValue()

Returns the value of the page key parameter.

public static getGetValue(string $field[, string $sanitizeAs = null ]) : string
Parameters
$field : string

key GET

$sanitizeAs : string = null

treat the returned value as float|int|string

Return values
string

getItemsCount()

Returns number of enclosed items in current or given object.

public getItemsCount() : int
Return values
int

getPostValue()

Returns the value of the page key parameter.

public static getPostValue(string $field[, string $sanitizeAs = null ]) : mixed
Parameters
$field : string

key POST

$sanitizeAs : string = null

treat the returned value as float|int|string

Return values
mixed

getRendered()

Returns the rendered contents of objects.

public getRendered() : string
Return values
string

getRequestValue()

Returns the value of the page call parameter key.

public static getRequestValue(string $field[, string $sanitizeAs = null ]) : mixed
Parameters
$field : string

key POST or GET

$sanitizeAs : string = null

treat the returned value as float|int|string

Return values
mixed

getRequestValues()

Returns $_REQUEST field.

public getRequestValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTagClass()

Returns tags css class.

public getTagClass() : mixed
Return values
mixed

getTagID()

Returns taga html ID.

public getTagID() : string
Return values
string

getTagName()

Returns the name of the tag.

public getTagName() : string
Return values
string

getTagProperty()

Returns property tag value.

public getTagProperty(string $propertyName) : string
Parameters
$propertyName : string

the name of the tag property. eg "src" next to the image

Return values
string

current tag property value

getTagType()

Returns tag type.

public getTagType() : string
Return values
string

tag type e.g. img

getUri()

Returns the desired address.

public static getUri() : string
Return values
string

includeCss()

Include an CSS file call into page.

public includeCss(string $cssFile[, bool $fwPrefix = false ][, string $media = 'screen' ]) : bool
Parameters
$cssFile : string

path to the file inserted into the page

$fwPrefix : bool = false

add framework prefix (usually/Ease/) ?

$media : string = 'screen'

medium screen | print | braile etc ...

Return values
bool

includeJavaScript()

Includes Javascript into the page.

public includeJavaScript(string $javaScriptFile[, string $position = null ]) : string
Parameters
$javaScriptFile : string

javascriptem using file

$position : string = null

final positione: '+','-','0','--',...

Return values
string

isEmpty()

Is the element empty?

public isEmpty() : bool
Return values
bool

emptiness

isFinalized()

Returns the status of the part finalization of the flag.

public isFinalized() : bool
Return values
bool

isFormPosted()

Was the page displayed after the form was submitted using the POST method?

public static isFormPosted() : bool
Tags
category

requestValue

Return values
bool

isPosted()

Is page called by Form Post ?

public static isPosted() : bool
Return values
bool

lastItem()

Vrací odkaz na poslední vloženou položku.

public lastItem() : Brick|mixed
Return values
Brick|mixed

makePagePublic()

Open Previously closed Web Page.

public makePagePublic() : bool
Return values
bool

onlyForLogged()

Redirects the unlogged-in user to the login page.

public onlyForLogged([string $loginPage = 'login.php' ][, null|mixed $message = null ]) : bool
Parameters
$loginPage : string = 'login.php'

login page address

$message : null|mixed = null
Return values
bool

Logged

phpSelf()

Returns the current URL. This is instead of PHP_SELF which is unsafe.

public static phpSelf([bool $dropqs = true ]) : string
Parameters
$dropqs : bool = true

whether to drop the querystring or not. Default true

Return values
string

the current URL or NULL for php-cli

redirect()

Perform http redirect.

public redirect(string $url) : void
Parameters
$url : string

redirect to URL

Return values
void

registerItem()

Registers the item for finalization.

public static registerItem(mixed &$itemPointer) : void
Parameters
$itemPointer : mixed
Return values
void

sanitizeAsType()

It treats the transformation according to its expected type.

public static sanitizeAsType(mixed $value, string $sanitizeAs) : mixed
Parameters
$value : mixed

value

$sanitizeAs : string

value type int|string|float|null

Return values
mixed

setEmbedName()

Notify component about its embed name.

public setEmbedName(string $embedName) : bool
Parameters
$embedName : string

parent::$pageParts[$embedName] == self

Return values
bool

success

setFinalized()

Set label of parts finalized.

public setFinalized([bool $flag = true ]) : void
Parameters
$flag : bool = true

finalization flag

Return values
void

setObjectName()

Sets ObjectName.

public setObjectName([string $objectName = null ]) : string
Parameters
$objectName : string = null

object name

Return values
string

New object name

setTagClass()

Sets tag class.

public setTagClass(string $className) : void
Parameters
$className : string

jméno css třídy

Return values
void

setTagCss()

Sets Css parameters.

public setTagCss(array<string|int, mixed> $cssProperties) : void
Parameters
$cssProperties : array<string|int, mixed>

asociative feild, or CSS definition

Return values
void

setTagID()

Sets the tag specified by the id, or randomly generated.

public setTagID([string $tagID = null ]) : string
Parameters
$tagID : string = null

html tag #ID for JavaScript a Css

Return values
string

the set ID

setTagName()

Name tag settings. Unused .

public setTagName(string $tagName) : void

..

Parameters
$tagName : string

he name of the tag in the property NAME

Return values
void

setTagProperties()

Sets tag parameters.

public setTagProperties(array<string|int, mixed> $properties) : bool
Parameters
$properties : array<string|int, mixed>

associative array of tag parameters

Return values
bool

operation success

setTagProperty()

Sets tag property to given value.

public setTagProperty(string $name, string $value) : bool
Parameters
$name : string
$value : string
Return values
bool

setTagType()

Sets up tag type.

public setTagType(string $tagType) : void
Parameters
$tagType : string

tag type e.g. img

Return values
void

suicide()

Allows an already inserted object to be removed from the tree for rendering.

public suicide() : mixed
Return values
mixed

tagBegin()

Show pair tag begin.

public tagBegin() : void
Return values
void

tagEnclousure()

Show pair tag ending.

public tagEnclousure() : void
Return values
void

tagPropertiesToString()

Returns tag parameters as a string.

public tagPropertiesToString() : string
Return values
string

webPage()

Returns or registers an instance of a Web page.

public static webPage([WebPage $oPage = null ]) : WebPage
Parameters
$oPage : WebPage = null

website object to register

Return values
WebPage

Search results