PHP Класс Horde_PageOutput, horde

Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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)

Свойство Тип Описание
$_compress boolean Has PHP userspace page compression been started?
$_view integer View mode.

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

Метод Описание
__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.

Защищенные методы

Метод Описание
_addBasicScripts ( ) Add basic framework scripts to the output.

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

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

Constructor.
public __construct ( )

_addBasicScripts() защищенный Метод

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

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

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
Результат array Returns the variable list of 'ret_vars' option is true.

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

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() публичный Метод

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() публичный Метод

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() публичный Метод

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.
Результат Horde_Script_File Script file object.

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

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.
Результат Horde_Script_Package Package object.

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

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() публичный Метод

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

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.
public disableCompression ( )

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

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() публичный Метод

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

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

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

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

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() публичный Метод

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

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

See Horde Bug #8836.
public noDnsPrefetch ( )

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

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() публичный Метод

Output LINK tags.
public outputLinkTags ( )

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

Output META tags to page.
public outputMetaTags ( )

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

Output files needed for smartmobile mode.
Устаревший:

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

Activates output compression.
public startCompression ( )

Описание свойств

$_compress защищенное свойство

Has PHP userspace page compression been started?
protected bool $_compress
Результат boolean

$_view защищенное свойство

View mode.
protected int $_view
Результат integer

$ajax публичное свойство

Output code necessary to perform AJAX operations?
public bool $ajax
Результат boolean

$css публичное свойство

Stylesheet object.
public Horde_Themes_Css $css
Результат Horde_Themes_Css

$debug публичное свойство

Activate debugging output.
public bool $debug
Результат boolean

$deferScripts публичное свойство

Defer loading of scripts until end of page?
public bool $deferScripts
Результат boolean

$growler публичное свойство

Output code necessary to display growler notifications?
public bool $growler
Результат boolean

$hsl публичное свойство

Script list.
public Horde_Script_List $hsl
Результат Horde_Script_List

$inlineScript публичное свойство

List of inline scripts.
public array $inlineScript
Результат array

$linkTags публичное свойство

List of LINK tags to output.
public array $linkTags
Результат array

$metaTags публичное свойство

List of META tags to output.
public array $metaTags
Результат array

$sidebar публичное свойство

Load the sidebar in this page?
public bool $sidebar
Результат boolean

$smartmobileInit публичное свойство

Smartmobile init code that needs to be output before jquery.mobile.js is loaded.
С версии: 2.12.0
public array $smartmobileInit
Результат array

$topbar публичное свойство

Load the topbar in this page?
public bool $topbar
Результат boolean