PHP Class CampHTMLDocument

显示文件 Open project: sourcefabric/newscoop Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
__construct ( array $p_attributes = [] ) Class constructor
templateExists ( string $template, Smarty $smarty ) : boolean Test if template exists

Method Details

getCharset() public method

Returns the charset.
public getCharset ( ) : string
return string

getGenerator() public method

Returns the page generator.
public getGenerator ( ) : string
return string

getMetaTag() public method

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
return string $tag

getMimeType() public method

Returns the MIME type.
public getMimeType ( ) : string
return string

getTitle() public method

Returns the title of the document.
public getTitle ( ) : string
return string

getType() public method

Returns the type of document.
public getType ( ) : string
return string

render() public method

Displays the document after parsing it.
public render ( array $p_params ) : void
$p_params array
return void

setCharset() public method

Sets the charset.
public setCharset ( string $p_charset = 'utf-8' ) : void
$p_charset string
return void

setMetaTag() public method

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
return void

setMimeType() public method

Sets the MIME type for the document.
public setMimeType ( string $p_mime = 'text/html' ) : void
$p_mime string
return void

setTitle() public method

Sets the document title.
public setTitle ( string $p_title = null ) : void
$p_title string
return void

singleton() public static method

Builds an instance object of this class only if there is no one.
public static singleton ( array $p_attributes = [] ) : object
$p_attributes array
return object