PHP Class Horde_PageOutput, horde

Author: Michael Slusarz ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Свойство Type Description
$ajax boolean Output code necessary to perform AJAX operations?
$css Horde_Themes_Css Stylesheet object.
$debug boolean Activate debugging output.
$deferScripts boolean Defer loading of scripts until end of page?
$growler boolean Output code necessary to display growler notifications?
$hsl Horde_Script_List Script list.
$inlineScript array List of inline scripts.
$linkTags array List of LINK tags to output.
$metaTags array List of META tags to output.
$sidebar boolean Load the sidebar in this page?
$smartmobileInit array Smartmobile init code that needs to be output before jquery.mobile.js is loaded.
$topbar boolean Load the topbar in this page?

Protected Properties

Свойство Type Description
$_compress boolean Has PHP userspace page compression been started?
$_view integer View mode.

Méthodes publiques

Méthode Description
__construct ( ) Constructor.
addInlineJsVars ( array $data, mixed $opts = [] ) : array Add inline javascript variable definitions to the output buffer.
addInlineScript ( mixed $script, boolean $onload = false, boolean $top = false ) Add inline javascript to the output buffer.
addLinkTag ( array $opts = [] ) Adds a LINK tag.
addMetaTag ( string $name, string $content, boolean $http_equiv = true ) Adds a META tag to the page output.
addScriptFile ( mixed $file, string $app = null ) : Horde_Script_File Adds a single javascript script to the output (if output has already started), or to the list of script files to include in the output.
addScriptPackage ( mixed $package ) : Horde_Script_Package Adds a javascript package to the browser output.
addStylesheet ( Horde_Themes_Element | string $file, string $url = null ) Adds an external stylesheet to the output.
addThemeStylesheet ( string $file ) Adds a themed stylesheet to the output.
disableCompression ( ) Disables output compression. If successful, throws out all data currently in the output buffer. Must be called before any data is sent to the browser.
footer ( array $opts = [] ) Output page footer.
header ( array $opts = [] ) Output the page header.
includeFavicon ( ) Generate and output the favicon tag for the current application.
includeScriptFiles ( ) Outputs the necessary script tags, honoring configuration choices as to script caching.
includeStylesheetFiles ( array $opts = [], array $full = false ) Generate the stylesheet tags for the current application.
metaRefresh ( integer $time, string $url ) Adds a META refresh tag.
noDnsPrefetch ( ) Adds a META tag to disable DNS prefetching.
outputInlineScript ( boolean $raw = false ) Print pending inline javascript to the output buffer.
outputLinkTags ( ) Output LINK tags.
outputMetaTags ( ) Output META tags to page.
outputSmartmobileFiles ( ) Output files needed for smartmobile mode.
startCompression ( ) Activates output compression.

Méthodes protégées

Méthode Description
_addBasicScripts ( ) Add basic framework scripts to the output.

Method Details

__construct() public méthode

Constructor.
public __construct ( )

_addBasicScripts() protected méthode

Add basic framework scripts to the output.
protected _addBasicScripts ( )

addInlineJsVars() public méthode

Add inline javascript variable definitions to the output buffer.
public addInlineJsVars ( array $data, mixed $opts = [] ) : array
$data array Keys are the variable names, values are the data to JSON encode. If the key begins with a '-', the data will be added to the output as-is.
$opts mixed If boolean true, equivalent to setting the 'onload' option to true. Other options: - onload: (boolean) Wrap the definition in an onload handler? DEFAULT: false - ret_vars: (boolean) If true, will return the list of variable definitions instead of outputting to page. DEFAULT: false - top: (boolean) Add definitions to top of stack? DEFAULT: false
Résultat array Returns the variable list of 'ret_vars' option is true.

addInlineScript() public méthode

Add inline javascript to the output buffer.
public addInlineScript ( mixed $script, boolean $onload = false, boolean $top = false )
$script mixed The script text to add (can be stored in an array).
$onload boolean Load the script after the page (DOM) has loaded?
$top boolean Add script to top of stack?

addLinkTag() public méthode

All attributes are HTML-encoded. Only pass raw, unencoded attribute values to avoid double escaping.
public addLinkTag ( array $opts = [] )
$opts array Non-default tag elements.

addMetaTag() public méthode

Adds a META tag to the page output.
public addMetaTag ( string $name, string $content, boolean $http_equiv = true )
$name string The name value.
$content string The content of the META tag.
$http_equiv boolean Output http-equiv instead of name?

addScriptFile() public méthode

Adds a single javascript script to the output (if output has already started), or to the list of script files to include in the output.
public addScriptFile ( mixed $file, string $app = null ) : Horde_Script_File
$file mixed Either a Horde_Script_File object, or the full javascript file name.
$app string If $file is a file name, this is the application where the file is located. Defaults to the current registry application.
Résultat Horde_Script_File Script file object.

addScriptPackage() public méthode

Adds a javascript package to the browser output.
public addScriptPackage ( mixed $package ) : Horde_Script_Package
$package mixed Either a classname, basename of a Horde_Core_Script_Package class, or a Horde_Script_Package object.
Résultat Horde_Script_Package Package object.

addStylesheet() public méthode

Adds an external stylesheet to the output.
public addStylesheet ( Horde_Themes_Element | string $file, string $url = null )
$file Horde_Themes_Element | string Either a Horde_Themes_Element object or the CSS filepath.
$url string If $file is a string, this must be a CSS URL.

addThemeStylesheet() public méthode

Adds a themed stylesheet to the output.
public addThemeStylesheet ( string $file )
$file string The stylesheet name.

disableCompression() public méthode

Disables output compression. If successful, throws out all data currently in the output buffer. Must be called before any data is sent to the browser.
public disableCompression ( )

header() public méthode

Output the page header.
public header ( array $opts = [] )
$opts array Options: - body_class: (string) - body_id: (string) - html_id: (string) - smartmobileinit: (string) (@deprecated; use $this->smartmobileInit instead) - stylesheet_opts: (array) - title: (string) - view: (integer)

includeFavicon() public méthode

Generate and output the favicon tag for the current application.
public includeFavicon ( )

includeScriptFiles() public méthode

Outputs the necessary script tags, honoring configuration choices as to script caching.
public includeScriptFiles ( )

includeStylesheetFiles() public méthode

Generate the stylesheet tags for the current application.
public includeStylesheetFiles ( array $opts = [], array $full = false )
$opts array Options to pass to Horde_Themes_Css::getStylesheetUrls().
$full array Return a full URL?

metaRefresh() public méthode

Adds a META refresh tag.
public metaRefresh ( integer $time, string $url )
$time integer Refresh time.
$url string Refresh URL

noDnsPrefetch() public méthode

See Horde Bug #8836.
public noDnsPrefetch ( )

outputInlineScript() public méthode

Print pending inline javascript to the output buffer.
public outputInlineScript ( boolean $raw = false )
$raw boolean Return the raw script (not wrapped in CDATA tags or observe wrappers)?

outputLinkTags() public méthode

Output LINK tags.
public outputLinkTags ( )

outputMetaTags() public méthode

Output META tags to page.
public outputMetaTags ( )

outputSmartmobileFiles() public méthode

Output files needed for smartmobile mode.
Deprecation:

startCompression() public méthode

Activates output compression.
public startCompression ( )

Property Details

$_compress protected_oe property

Has PHP userspace page compression been started?
protected bool $_compress
Résultat boolean

$_view protected_oe property

View mode.
protected int $_view
Résultat integer

$ajax public_oe property

Output code necessary to perform AJAX operations?
public bool $ajax
Résultat boolean

$css public_oe property

Stylesheet object.
public Horde_Themes_Css $css
Résultat Horde_Themes_Css

$debug public_oe property

Activate debugging output.
public bool $debug
Résultat boolean

$deferScripts public_oe property

Defer loading of scripts until end of page?
public bool $deferScripts
Résultat boolean

$growler public_oe property

Output code necessary to display growler notifications?
public bool $growler
Résultat boolean

$hsl public_oe property

Script list.
public Horde_Script_List $hsl
Résultat Horde_Script_List

$inlineScript public_oe property

List of inline scripts.
public array $inlineScript
Résultat array

$linkTags public_oe property

List of LINK tags to output.
public array $linkTags
Résultat array

$metaTags public_oe property

List of META tags to output.
public array $metaTags
Résultat array

$sidebar public_oe property

Load the sidebar in this page?
public bool $sidebar
Résultat boolean

$smartmobileInit public_oe property

Smartmobile init code that needs to be output before jquery.mobile.js is loaded.
Since: 2.12.0
public array $smartmobileInit
Résultat array

$topbar public_oe property

Load the topbar in this page?
public bool $topbar
Résultat boolean