CaMykS  1.0-20181201
 All Classes Files Functions Variables Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
HTMLPage Class Reference

Public Member Functions

 __construct ()
 
 set_siteInformations ($site_title, $site_author='')
 
 set_pageInformations ($page_title, $page_desc='', $page_keys='', $page_lang='')
 
 set_robotInformations ($index=true, $follow=true)
 
 set_googleInformations ($code='', $domain='')
 
 set_favicon ($favicon=null)
 
 set_charset ($charset='')
 
 add_meta ($key, $value, $method='name')
 
 add_link ($rel, $href, $params=array())
 
 add_JSFile ($file='')
 
 add_JSScript ($script='', $unique=false)
 
 add_JSPreScript ($script='', $unique=false)
 
 add_JSWindowEventScript ($event, $script, $unique=false)
 
 add_JSloadScript ($script='', $unique=false)
 
 add_JSunloadScript ($script='', $unique=false)
 
 add_styleFile ($file='', $media='', $condition='')
 
 add_styleScript ($css='')
 
 add_styleIncludedFile ($file='')
 
 add_headerExtra ($content='')
 
 add_RSSFeed ($url='', $title='')
 
 set_redirect ($time, $url)
 
 set_mobileMeta ($enabled=false, $config=array())
 
 write_HTMLContent ($buffer='')
 
 flush ($buffer= '')
 
 add_HTMLContent ($content='')
 
 write_HTMLFile ($file='', $buffer='')
 
 add_HTMLHeader ()
 
 add_HTMLFooter ()
 
 get_doctype ()
 
 get_htmlHeader ()
 
 get_title ()
 
 get_metas ()
 
 get_links ()
 
 get_JSFiles ()
 
 get_JSPreScripts ()
 
 get_JSScripts ()
 
 get_styleFiles ()
 
 get_styleScripts ()
 
 get_headerExtras ()
 
 get_body ()
 
 set_RSSFeed ($url='', $title='')
 

Public Attributes

 $page_title = ''
 Content page title for page header. More...
 

Private Attributes

 $content
 Page content. More...
 
 $doctype
 Page doctype. More...
 
 $htmlVersion
 HTML version for page. More...
 
 $language
 Page current language. More...
 
 $redirect_time = 0
 Page redirection delay in second. More...
 
 $redirect_url = ''
 Page redirection URL. More...
 
 $disable_cache = false
 Is cache disabled for page. More...
 
 $site_title = ''
 Site title for page header. More...
 
 $charset = "UTF-8"
 Page charset header. More...
 
 $metas = array()
 Page metas header. More...
 
 $rss = ''
 RSS URL for page header. More...
 
 $robots_index = true
 Are robots allowed to index this page. More...
 
 $robots_follow = true
 Are robots allowed to follow links in this page. More...
 
 $js_files = array()
 Javascript files to be inserted. More...
 
 $js_scripts = array()
 Javascript scripts to be inserted. More...
 
 $js_pre_scripts = array()
 Javascript scripts to be inserted before Javascript file insertion. More...
 
 $js_event_scripts = array()
 Javascript scripts to be inserted on page events. More...
 
 $style_files = array()
 CSS styles files to be inserted. More...
 
 $style_scripts = array()
 CSS styles scripts to be inserted. More...
 
 $style_included_files = array()
 CSS styles files to be inserted as script. More...
 
 $links = array()
 Header links for page. More...
 
 $google_analytics = array('code'=>'', 'domain'=>'auto')
 Google analytics information to be inserted in page. More...
 
 $header_extras = ''
 Page extra headers. More...
 
 $favicon = ''
 

Detailed Description

HTMLPage class.

Author
CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Constructor & Destructor Documentation

HTMLPage::__construct ( )

Class constructor.

Returns
void

Member Function Documentation

HTMLPage::add_headerExtra (   $content = '')

Add extra content to header.

Parameters
string$content
Returns
void
HTMLPage::add_HTMLContent (   $content = '')

Update content with given html content

Parameters
string$content
Returns
void
HTMLPage::add_HTMLFooter ( )

Write html page footer.

Returns
void
HTMLPage::add_HTMLHeader ( )

Write html page header.

Returns
void
HTMLPage::add_JSFile (   $file = '')

Add a new Javascript file.

Parameters
string$filethe file path & name
Returns
void
HTMLPage::add_JSloadScript (   $script = '',
  $unique = false 
)

Add Javascript script on load window event.

See also
add_JSWindowEventScript()
Parameters
string$scriptthe script to add
boolean$uniquetell if this script must be unique
Returns
void
HTMLPage::add_JSPreScript (   $script = '',
  $unique = false 
)

Add a new Javascript pre-script.

Parameters
string$scriptthe script to add
boolean$uniquethis script has to be unique
Returns
void
HTMLPage::add_JSScript (   $script = '',
  $unique = false 
)

Add a new Javascript script.

Parameters
string$scriptthe script to add
boolean$uniquethis script has to be unique
Returns
void
HTMLPage::add_JSunloadScript (   $script = '',
  $unique = false 
)

Add Javascript script on unload window event.

See also
add_JSWindowEventScript()
Parameters
string$scriptthe script to add
boolean$uniquetell if this script must be unique
Returns
void
HTMLPage::add_JSWindowEventScript (   $event,
  $script,
  $unique = false 
)

Add a new Javascript script to window event script list.

Parameters
string$eventthe window event
string$scriptthe script to add
boolean$uniquethis script has to be unique
Returns
void
HTMLPage::add_link (   $rel,
  $href,
  $params = array() 
)

Add a new link

Parameters
string$relthe rel value
string$hrefthe href value
array$paramsthe other params
Returns
void
HTMLPage::add_meta (   $key,
  $value,
  $method = 'name' 
)

Add a new meta.

Parameters
string$keythe meta name
string$valuethe meta value
string$methodthe meta displaying method
Returns
void
HTMLPage::add_RSSFeed (   $url = '',
  $title = '' 
)

Add RSS feed.

Parameters
string$urlthe feed URL
string$titlethe feed title
Returns
void
HTMLPage::add_styleFile (   $file = '',
  $media = '',
  $condition = '' 
)

Add CSS style file.

Parameters
string$filethe file path & name
string$mediathe media which the style will be displayed
string$conditionthe media condition
Returns
void
HTMLPage::add_styleIncludedFile (   $file = '')

Add CSS style file to be inserted as script.

Parameters
string$filethe file path & name
Returns
void
HTMLPage::add_styleScript (   $css = '')

Add CSS style script.

Parameters
string$cssthe style script to add
Returns
void
HTMLPage::flush (   $buffer = '')

Alias for write_HTMLContent method.

See also
write_HTMLContent()
Parameters
string$bufferthe content to output
Returns
void
HTMLPage::get_body ( )

Write body header.

Returns
void
HTMLPage::get_doctype ( )

Write page header doctype.

Returns
void
HTMLPage::get_headerExtras ( )

write extra header data

Returns
void
HTMLPage::get_htmlHeader ( )

Write page html header.

Returns
void
HTMLPage::get_JSFiles ( )

Write page jeader Javascript files

Returns
void
HTMLPage::get_JSPreScripts ( )

Write Javascript pre-scripts.

Returns
void
HTMLPage::get_JSScripts ( )

Write Javascript scripts

Returns
void
HTMLPage::get_links ( )

Write page header links.

Returns
void
HTMLPage::get_metas ( )

Write page header metas.

Returns
void
HTMLPage::get_styleFiles ( )

Write style files.

Returns
void
HTMLPage::get_styleScripts ( )

Write style scripts.

Returns
void
HTMLPage::get_title ( )

Write page title header.

Returns
void
HTMLPage::set_charset (   $charset = '')

Define charset.

Parameters
string$charset
Returns
void
HTMLPage::set_favicon (   $favicon = null)

Define site favicon.

Parameters
string$faviconthe favicon file name
Returns
void
HTMLPage::set_googleInformations (   $code = '',
  $domain = '' 
)

Define google information.

Parameters
string$codethe google code value
string$domainthe google domain value
Returns
void
HTMLPage::set_mobileMeta (   $enabled = false,
  $config = array() 
)

Define mobile metas.

Parameters
boolean$enabled
array$config- Available parameters are
string width
string initial-scale
string maximum-scale
integer user-scalable
Returns
void
HTMLPage::set_pageInformations (   $page_title,
  $page_desc = '',
  $page_keys = '',
  $page_lang = '' 
)

Define page information.

Parameters
string$page_titlethe webpage title
string$page_descthe webpage description meta
string$page_keysthe webpage keywords meta
string$page_langthe webpage language displayed
Returns
void
HTMLPage::set_redirect (   $time,
  $url 
)

Set a http redirection.

Parameters
int$timethe time before redirection in second
string$urlthe target url
Returns
void
HTMLPage::set_robotInformations (   $index = true,
  $follow = true 
)

Define robots information.

Parameters
boolean$indexthe index value
boolean$followthe follow value
Returns
void
HTMLPage::set_RSSFeed (   $url = '',
  $title = '' 
)

Alias to add_RSSFeed.

See also
add_RSSFeed()
Parameters
string$urlthe rss url
string$titlethe rss title
Returns
void
Deprecated:
Use add_RSSFeed instead.
HTMLPage::set_siteInformations (   $site_title,
  $site_author = '' 
)

Define site information.

Parameters
string$site_titlethe website title
string$site_authorthe website author
Returns
void
HTMLPage::write_HTMLContent (   $buffer = '')

Display builded content and re-initialise actual content.

Parameters
string$bufferthe content to output
Returns
void
HTMLPage::write_HTMLFile (   $file = '',
  $buffer = '' 
)

Display built content updated with buffer value, then add a file content.

Parameters
string$filethe file path & name
string$bufferthe content to add
Returns
string

Member Data Documentation

string HTMLPage::$charset = "UTF-8"
private

Page charset header.

string HTMLPage::$content
private

Page content.

boolean HTMLPage::$disable_cache = false
private

Is cache disabled for page.

string HTMLPage::$doctype
private

Page doctype.

HTMLPage::$favicon = ''
private
array HTMLPage::$google_analytics = array('code'=>'', 'domain'=>'auto')
private

Google analytics information to be inserted in page.

array HTMLPage::$header_extras = ''
private

Page extra headers.

integer HTMLPage::$htmlVersion
private

HTML version for page.

array HTMLPage::$js_event_scripts = array()
private

Javascript scripts to be inserted on page events.

array HTMLPage::$js_files = array()
private

Javascript files to be inserted.

array HTMLPage::$js_pre_scripts = array()
private

Javascript scripts to be inserted before Javascript file insertion.

array HTMLPage::$js_scripts = array()
private

Javascript scripts to be inserted.

string HTMLPage::$language
private

Page current language.

array HTMLPage::$links = array()
private

Header links for page.

array HTMLPage::$metas = array()
private

Page metas header.

string HTMLPage::$page_title = ''

Content page title for page header.

int HTMLPage::$redirect_time = 0
private

Page redirection delay in second.

string HTMLPage::$redirect_url = ''
private

Page redirection URL.

boolean HTMLPage::$robots_follow = true
private

Are robots allowed to follow links in this page.

boolean HTMLPage::$robots_index = true
private

Are robots allowed to index this page.

string HTMLPage::$rss = ''
private

RSS URL for page header.

string HTMLPage::$site_title = ''
private

Site title for page header.

array HTMLPage::$style_files = array()
private

CSS styles files to be inserted.

array HTMLPage::$style_included_files = array()
private

CSS styles files to be inserted as script.

array HTMLPage::$style_scripts = array()
private

CSS styles scripts to be inserted.


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