xHTML-o-MATIC
A mini framework for handling PHP web frontends.
Loading...
Searching...
No Matches
xHTML_Page Class Reference

Public Member Functions

 __construct ($title="Default Title")
 
 Render ()
 
 ToString ()
 
 AddOnloadFunctionContent ($content)
 
 ReplaceContent ($content)
 
 AddContent ($content)
 
 SetEncoding ($enc)
 
 AddMetaInfo ($meta)
 
 SetTitle ($title)
 
 AddScript ($script)
 
 AddCSSClass ($classname)
 
 SetIcon ($icon_href)
 
 SetShortcutIcon ($icon_href)
 
 AddJSFile ($href)
 
 AddCSSFile ($href)
 
 AddStyle ($style)
 
 AddStyleToBody ($style)
 
 SetTextDirection ($dir)
 
 SetHTMLLanguage ($lang)
 

Protected Attributes

 $head
 
 $body
 
 $encoding
 
 $dir
 
 $lang
 
 $onloadFunctionContent
 

Constructor & Destructor Documentation

◆ __construct()

xHTML_Page::__construct (   $title = "Default Title")

Default constructor

Member Function Documentation

◆ AddContent()

xHTML_Page::AddContent (   $content)

Adds content

Parameters
string$contentContent

◆ AddCSSClass()

xHTML_Page::AddCSSClass (   $classname)

Adds a CSS class to this object (the body of the page is the only place where this makes sense)

Parameters
string$classnameCSS class name

◆ AddCSSFile()

xHTML_Page::AddCSSFile (   $href)

Adds a CSS file

Parameters
string$hrefFile

◆ AddJSFile()

xHTML_Page::AddJSFile (   $href)

Adds a JS File

Parameters
string$hrefFile source

◆ AddMetaInfo()

xHTML_Page::AddMetaInfo (   $meta)

Sets meta info

Parameters
xHTML_Meta$metaMeta tag

◆ AddOnloadFunctionContent()

xHTML_Page::AddOnloadFunctionContent (   $content)

Adds onload function content

Parameters
string$contentContent to add

◆ AddScript()

xHTML_Page::AddScript (   $script)

Adds script

Parameters
string | xHTML_JavaScript$scriptScript to add

◆ AddStyle()

xHTML_Page::AddStyle (   $style)

Adds an style

Parameters
string | xHTML_Style$styleStyle

◆ AddStyleToBody()

xHTML_Page::AddStyleToBody (   $style)

Adds style to body

Parameters
string$styleCSS style string

◆ Render()

xHTML_Page::Render ( )

Displays page in HTML

◆ ReplaceContent()

xHTML_Page::ReplaceContent (   $content)

Replaces content

Parameters
string | xHTML_Item | array$contentContent to replace

◆ SetEncoding()

xHTML_Page::SetEncoding (   $enc)

Set encoding

Parameters
string$encEncoding type

◆ SetHTMLLanguage()

xHTML_Page::SetHTMLLanguage (   $lang)

Sets HTML Language tag

Parameters
string$langLanguage (according to xml:lang attribute!)

◆ SetIcon()

xHTML_Page::SetIcon (   $icon_href)

Sets page icon

Parameters
string$icon_hrefIcon HREF

◆ SetTextDirection()

xHTML_Page::SetTextDirection (   $dir)

Sets text direction

Parameters
string$dirText direction (ltr, rtl)

◆ SetTitle()

xHTML_Page::SetTitle (   $title)

Sets page title

Parameters
string$titleTitle

◆ ToString()

xHTML_Page::ToString ( )

Gets contents' string

Returns
string

The documentation for this class was generated from the following file: