PHP Класс CampHTMLDocument

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getCharset ( ) : string Returns the charset.
getGenerator ( ) : string Returns the page generator.
getMetaTag ( string $p_name, boolean $p_httpEquiv = false ) : string Returns the requested META tag.
getMimeType ( ) : string Returns the MIME type.
getTitle ( ) : string Returns the title of the document.
getType ( ) : string Returns the type of document.
render ( array $p_params ) : void Renders the document.
setCharset ( string $p_charset = 'utf-8' ) : void Sets the charset.
setMetaTag ( string $p_name, mixed $p_value, boolean $p_httpEquiv = false ) : void Sets the given META tag.
setMimeType ( string $p_mime = 'text/html' ) : void Sets the MIME type for the document.
setTitle ( string $p_title = null ) : void Sets the document title.
singleton ( array $p_attributes = [] ) : object Builds an instance object of this class only if there is no one.

Приватные методы

Метод Описание
__construct ( array $p_attributes = [] ) Class constructor
templateExists ( string $template, Smarty $smarty ) : boolean Test if template exists

Описание методов

getCharset() публичный Метод

Returns the charset.
public getCharset ( ) : string
Результат string

getGenerator() публичный Метод

Returns the page generator.
public getGenerator ( ) : string
Результат string

getMetaTag() публичный Метод

Returns the requested META tag.
public getMetaTag ( string $p_name, boolean $p_httpEquiv = false ) : string
$p_name string The name of the META tag to be retrieved
$p_httpEquiv boolean Whether it is a http-equiv META tag or not
Результат string $tag

getMimeType() публичный Метод

Returns the MIME type.
public getMimeType ( ) : string
Результат string

getTitle() публичный Метод

Returns the title of the document.
public getTitle ( ) : string
Результат string

getType() публичный Метод

Returns the type of document.
public getType ( ) : string
Результат string

render() публичный Метод

Displays the document after parsing it.
public render ( array $p_params ) : void
$p_params array
Результат void

setCharset() публичный Метод

Sets the charset.
public setCharset ( string $p_charset = 'utf-8' ) : void
$p_charset string
Результат void

setMetaTag() публичный Метод

Sets the given META tag.
public setMetaTag ( string $p_name, mixed $p_value, boolean $p_httpEquiv = false ) : void
$p_name string The name of the META tag to be retrieved
$p_value mixed The value for the META tag
$p_httpEquiv boolean Whether it is a http-equiv META tag or not
Результат void

setMimeType() публичный Метод

Sets the MIME type for the document.
public setMimeType ( string $p_mime = 'text/html' ) : void
$p_mime string
Результат void

setTitle() публичный Метод

Sets the document title.
public setTitle ( string $p_title = null ) : void
$p_title string
Результат void

singleton() публичный статический Метод

Builds an instance object of this class only if there is no one.
public static singleton ( array $p_attributes = [] ) : object
$p_attributes array
Результат object