This class provides methods in order to ease the production of a HTML5 Web page.
More...
|
string | $lang = "" |
| Language in which the content is written. More...
|
|
string | $title = "" |
| Text nested in the <title> element (mandatory) More...
|
|
string | $head = "" |
| Content nested in the <head> element (mainly CSS code) More...
|
|
string | $body = "" |
| Content nested in the <body> element. More...
|
|
string | $bodyScripts = "" |
| Scripts inserted after the content nested in the <body> element, for performance purposes. More...
|
|
◆ __construct()
WebPageEnhanced::__construct |
( |
string |
$title = "" , |
|
|
string |
$lang = "fr" |
|
) |
| |
Constructor.
- Parameters
-
string | $title | Page title (mandatory) |
string | $lang | Language global attribute |
Reimplemented in MaterialWebPage.
◆ appendContent()
WebPageEnhanced::appendContent |
( |
string |
$content | ) |
|
Add content nested in the <body> element.
- Parameters
-
string | $content | Content to be added |
◆ appendCss()
WebPageEnhanced::appendCss |
( |
string |
$css | ) |
|
Add CSS code nested in the <head> element.
- Parameters
-
string | $css | CSS code to be added |
◆ appendCssUrl()
WebPageEnhanced::appendCssUrl |
( |
string |
$url | ) |
|
Add the URL of an external CSS file.
- Parameters
-
◆ appendJs()
WebPageEnhanced::appendJs |
( |
string |
$js | ) |
|
Add JavaScript code.
- Parameters
-
string | $js | JavaScript code to be added |
◆ appendJsUrl()
WebPageEnhanced::appendJsUrl |
( |
string |
$url | ) |
|
Add the URL of an external JavaScript file.
- Parameters
-
string | $url | JavaScript file URL |
◆ appendScriptToBody()
WebPageEnhanced::appendScriptToBody |
( |
string |
$rawText | ) |
|
Add raw text to $bodyScripts attribute.
- Parameters
-
string | $rawText | raw text to be added |
◆ appendToHead()
WebPageEnhanced::appendToHead |
( |
string |
$content | ) |
|
Add content nested in the <head> element.
- Parameters
-
string | $content | Content to be added |
◆ escapeString()
static WebPageEnhanced::escapeString |
( |
string |
$string | ) |
|
|
static |
◆ getBody()
WebPageEnhanced::getBody |
( |
| ) |
|
◆ getBodyScripts()
WebPageEnhanced::getBodyScripts |
( |
| ) |
|
Return the $bodyScripts string.
◆ getHead()
WebPageEnhanced::getHead |
( |
| ) |
|
◆ getLastModification()
static WebPageEnhanced::getLastModification |
( |
| ) |
|
|
static |
◆ getTitle()
WebPageEnhanced::getTitle |
( |
| ) |
|
Return the $title string.
◆ setAuthor()
WebPageEnhanced::setAuthor |
( |
string |
$authorName | ) |
|
Set the author of the Web page.
- Parameters
-
string | $authorName | Author's name |
◆ setDescription()
WebPageEnhanced::setDescription |
( |
string |
$descriptionText | ) |
|
Add a short description to the Web page.
- Parameters
-
string | $descriptionText | Short description text |
◆ setKeywords()
WebPageEnhanced::setKeywords |
( |
string |
$keywordList | ) |
|
Attach a list of keywords to the Web page.
- Parameters
-
string | $keywordList | Keyword list |
◆ setLanguage()
WebPageEnhanced::setLanguage |
( |
string |
$lang | ) |
|
Set the language in which the content is written.
- Parameters
-
string | $lang | Language codename (en, fr, pt, ...) |
◆ setTitle()
WebPageEnhanced::setTitle |
( |
string |
$title | ) |
|
Set the title of the Web page.
- Parameters
-
◆ toHTML()
WebPageEnhanced::toHTML |
( |
| ) |
|
Generate the HTML5 code of the Web page as a string.
- Returns
- string HTML5 code
◆ $body
string WebPageEnhanced::$body = "" |
|
private |
Content nested in the <body> element.
◆ $bodyScripts
string WebPageEnhanced::$bodyScripts = "" |
|
private |
Scripts inserted after the content nested in the <body> element, for performance purposes.
◆ $head
string WebPageEnhanced::$head = "" |
|
private |
Content nested in the <head> element (mainly CSS code)
◆ $lang
string WebPageEnhanced::$lang = "" |
|
private |
Language in which the content is written.
◆ $title
string WebPageEnhanced::$title = "" |
|
private |
Text nested in the <title> element (mandatory)
The documentation for this class was generated from the following file: