PHP 클래스 Horde_PageOutput, horde

저자: Michael Slusarz ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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?

보호된 프로퍼티들

프로퍼티 타입 설명
$_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