Class Sylar_HtmlHead

Description

Html Head

It manage the <head> of html page

Located in /sylar/classes/presentation/html/HtmlHead.php (line 42)

Sylar_Format
   |
   --Sylar_Html
      |
      --Sylar_HtmlHead
Method Summary
 Sylar_HtmlHead __construct ([mixed $sTitle = null])
 void __destruct ()
 void addApplicationJavascript (string $sScriptFile, [string $sCharset = null])
 void addApplicationStyle (string $sStyleFile, [string $sCharset = null])
 void addFloatingJsScript (mixed $sScript, [string $sCharset = null], string $sScriptFile)
 void addFloatingStyle (string $sStyle, [string $sMedia = null])
 void addMetaTag (string $sContent, [string $sName = null], [string $sHttpEquiv = null])
 void addSylarJavascript (string $sScriptFile, [string $sCharset = null])
 void addSylarStyle (string $sStyleFile, [string $sCharset = null])
 void getAppJsUrlRoot ()
 string getHtmlSource ()
 void getPageTitle ()
 string render ()
 void setAppCssUrlRoot (mixed $sAppCssUrlRoot)
 void setAppJsUrlRoot (mixed $sAppJsUrlRoot)
 void setPageTitle (string $sTitle)
 void show ()
Methods
Constructor __construct (line 70)
Sylar_HtmlHead __construct ([mixed $sTitle = null])

Redefinition of:
Sylar_Html::__construct()
Destructor __destruct (line 83)
void __destruct ()

Redefinition of:
Sylar_Html::__destruct()
addApplicationJavascript (line 191)

Prepare <SCRIPT> Html tag from Application default repository it prepare the statment that includes js in html <script SRC='...'>...

The statment will be saved in the object. An example of statment is: <script src="app/javascript/mainGiano.js" type="text/javascript" charset="UTF-8"></script>

void addApplicationJavascript (string $sScriptFile, [string $sCharset = null])
  • string $sScriptFile
  • string $sCharset
addApplicationStyle (line 268)

Prepare and store <Style> to include Application css It prepares and stores in the object the html tag needed to include a CSS file.

For example: <link rel="stylesheet" href="/app/layouts/default/css/mainGiano.css" type="text/css" charset="UTF-8">

void addApplicationStyle (string $sStyleFile, [string $sCharset = null])
  • string $sStyleFile
  • string $sCharset
addFloatingJsScript (line 218)

it prepares floating JS script.

it prepares and stores in the object a js script to include between the tag <SCRIPT>. For example: <script> var i=100; for (j=0; j<i; j++){ etc... </script>

  • access: public
void addFloatingJsScript (mixed $sScript, [string $sCharset = null], string $sScriptFile)
  • string $sScriptFile
  • string $sCharset
addFloatingStyle (line 295)

Prepare and store floating <Style>

It's used to include a style directly in the html page, for example: <style type="text/css" media="all"> #one { width: 981px; } #two { width: 9px; } </style>

  • access: public
void addFloatingStyle (string $sStyle, [string $sMedia = null])
  • string $sStyle
  • string $sMedia
addMetaTag (line 141)

Prepare <META> html Tag

it prepares and store in the object the tag HTML <META> with attributes value passed as parameters. Results is something like: <meta http-equiv="pragma" content="no-cache"> <meta name="Author" content="pippo">

  • access: public
void addMetaTag (string $sContent, [string $sName = null], [string $sHttpEquiv = null])
  • string $sContent
  • string $sName
  • string $sHttpEquiv
addSylarJavascript (line 164)

Prepare <SCRIPT> Html tag from Sylar default repository it prepare the statment that includes js in html <script SRC='...'>...

The statment will be saved in the object. An example of statment is: <script src="sylar/javascript/mainGiano.js" type="text/javascript" charset="UTF-8"></script>

void addSylarJavascript (string $sScriptFile, [string $sCharset = null])
  • string $sScriptFile
  • string $sCharset
addSylarStyle (line 241)

Prepare and store <Style> to include Sylar css It prepares and stores in the object the html tag needed to include a CSS file.

For example: <link rel="stylesheet" href="/sylar/layouts/default/css/mainGiano.css" type="text/css" charset="UTF-8">

void addSylarStyle (string $sStyleFile, [string $sCharset = null])
  • string $sStyleFile
  • string $sCharset
getAppCssUrlRoot (line 96)
  • access: public
void getAppCssUrlRoot ()
getAppJsUrlRoot (line 103)
  • access: public
void getAppJsUrlRoot ()
getHtmlSource (line 308)

return the Html source it return html code of entire object

  • access: public
string getHtmlSource ()
getPageTitle (line 123)
  • access: public
void getPageTitle ()
render (line 338)

Render <HEAD> html Tag using all information stored in the object, this method render and returns the <HEAD> html tag in a string.

  • access: protected
string render ()
setAppCssUrlRoot (line 93)
  • access: public
void setAppCssUrlRoot (mixed $sAppCssUrlRoot)
setAppJsUrlRoot (line 100)
  • access: public
void setAppJsUrlRoot (mixed $sAppJsUrlRoot)
setPageTitle (line 120)

Set the Title of HTML Page included html tag <TITLE>

  • access: public
void setPageTitle (string $sTitle)
  • string $sTitle: is the title without html tag
show (line 319)

Display the page it prints the object Html source on screen

  • access: public
void show ()

Inherited Methods

Inherited From Sylar_Html

 Sylar_Html::__construct()
 Sylar_Html::fillTagAttributes()
 Sylar_Html::__destruct()

Inherited From Sylar_Format

 Sylar_Format::__construct()
 Sylar_Format::__destruct()

Documentation generated on Thu, 24 Apr 2008 16:14:15 +0200 by phpDocumentor 1.3.0RC3