PHP 클래스 Horde, horde

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

보호된 프로퍼티들

프로퍼티 타입 설명
$_bufferLevel integer The current buffer level.
$_contentSent boolean Has content been sent at the base buffer level?
$_labels array The labels already used in this page.
$_noAccessKey boolean Are accesskeys supported on this system.
$_used array The access keys already used in this page.

공개 메소드들

메소드 설명
__callStatic ( $name, $arguments ) Handle deprecated methods (located in Horde_Deprecated).
assertDriverConfig ( array $params, string $driver, array $fields, string $name = null, string $file = 'conf.php', string $variable = '$conf' ) Checks if all necessary parameters for a driver configuration are set and throws a fatal error with a detailed explanation how to fix this, if something is missing.
contentSent ( ) : boolean Has any content been sent to the browser?
debug ( mixed $event = null, string $fname = null, boolean $backtrace = true ) Debug method. Allows quick shortcut to produce debug output into a temporary file.
endBuffer ( ) : string End buffering output.
escapeJson ( mixed $data, array $options = [] ) : string Do necessary escaping to output JSON.
externalUrl ( string $url, boolean $tag = false ) : string Returns an external link passed through the dereferrer to strip session IDs from the referrer.
getAccessKey ( string $label, boolean $nocheck = false, boolean $shutdown = false ) : string Returns an un-used access key from the label given.
getAccessKeyAndTitle ( string $label, boolean $nocheck = false, boolean $return_array = false ) : string Returns the appropriate "accesskey" and "title" attributes for an HTML tag and the given label.
getCacheUrl ( string $type, array $params = [] ) : Horde_Url Creates a URL for cached data.
getDriverConfig ( mixed $backend, string $type = 'sql' ) : array Returns the driver parameters for the specified backend.
getTempDir ( ) : string Determines the location of the system temporary directory. If a specific configuration cannot be found, it defaults to /tmp.
getTempFile ( string $prefix = 'Horde', boolean $delete = true, string $dir = '', boolean $secure = false, boolean $session_remove = false ) : string Creates a temporary filename for the lifetime of the script, and (optionally) registers it to be deleted at request shutdown.
highlightAccessKey ( string $label, string $accessKey ) : string Highlights an access key in a label.
isConnectionSecure ( ) : boolean Is the current HTTP connection considered secure?
label ( string $for, string $label, string $ak = null ) : string Returns a label element including an access key for usage in conjuction with a form field. User preferences regarding access keys are respected.
link ( Horde_Url | string $url = '', string $title = '', string $class = '', string $target = '', string $onclick = '', string $title2 = '', string $accesskey = '', array $attributes = [], boolean $escape = true ) : string Returns an anchor tag with the relevant parameters
linkTooltip ( string $url, string $status = '', string $class = '', string $target = '', string $onclick = '', string $title = '', string $accesskey = '', array $attributes = [] ) : string Uses DOM Tooltips to display the 'title' attribute for link() calls.
log ( $event, $priority = null, array $options = [] ) Shortcut to logging method.
logMessage ( $event, $priority = null, array $options = [] ) Shortcut to logging method.
permissionDeniedError ( string $app, string $perm, string $error = null ) Process a permission denied error, running a user-defined hook if necessary.
popupJs ( string | Horde_Url $url, array $options = [] ) : string Output the javascript needed to call the popup JS function.
redirect ( string $url ) Utility function to send redirect headers to browser, handling any browser quirks.
requireSecureConnection ( ) Throws an exception if not using a secure connection.
selfUrl ( boolean $script_params = false, boolean $nocache = true, boolean $full = false, boolean $force_ssl = false ) : Horde_Url Returns a session-id-ified version of $SCRIPT_NAME resp. $PHP_SELF.
selfUrlParams ( array $opts = [] ) : Horde_Url Create a self URL of the current page, building the parameter list from the current Horde_Variables object (or via another Variables object passed as an optional argument) rather than the original request data.
sidebar ( string $app = null ) : Horve_View_Sidebar Returns the sidebar for the current application.
signQueryString ( mixed $queryString, integer $now = null ) : mixed Add a signature + timestamp to a query string and return the signed query string.
startBuffer ( ) Start buffering output.
stripAccessKey ( string $label ) : string Strips an access key from a label.
url ( mixed $uri, boolean $full = false, mixed $opts = [] ) : Horde_Url Returns a session-id-ified version of $uri.
verifySignedQueryString ( string $data, integer $now = null ) : boolean Verify a signature and timestamp on a query string.
webServerID ( ) : string Returns the Web server being used.
widget ( array $params ) : string Returns an anchor sequence with the relevant parameters for a widget with accesskey and text.
wrapInlineScript ( array $script ) : string Print inline javascript to output buffer after wrapping with necessary javascript tags.

메소드 상세

__callStatic() 공개 정적인 메소드

Handle deprecated methods (located in Horde_Deprecated).
public static __callStatic ( $name, $arguments )

assertDriverConfig() 공개 정적인 메소드

Checks if all necessary parameters for a driver configuration are set and throws a fatal error with a detailed explanation how to fix this, if something is missing.
public static assertDriverConfig ( array $params, string $driver, array $fields, string $name = null, string $file = 'conf.php', string $variable = '$conf' )
$params array The configuration array with all parameters.
$driver string The key name (in the configuration array) of the driver.
$fields array An array with mandatory parameter names for this driver.
$name string The clear text name of the driver. If not specified, the application name will be used.
$file string The configuration file that should contain these settings.
$variable string The name of the configuration variable.

contentSent() 공개 정적인 메소드

Has any content been sent to the browser?
public static contentSent ( ) : boolean
리턴 boolean True if content has been sent.

debug() 공개 정적인 메소드

Debug method. Allows quick shortcut to produce debug output into a temporary file.
public static debug ( mixed $event = null, string $fname = null, boolean $backtrace = true )
$event mixed Item to log.
$fname string Filename to log to. If empty, logs to 'horde_debug.txt' in the PHP temporary directory.
$backtrace boolean Include backtrace information?

endBuffer() 공개 정적인 메소드

End buffering output.
public static endBuffer ( ) : string
리턴 string The buffered output.

escapeJson() 공개 정적인 메소드

Do necessary escaping to output JSON.
public static escapeJson ( mixed $data, array $options = [] ) : string
$data mixed The data to JSON-ify.
$options array Additional options: - nodelimit: (boolean) Don't add security delimiters? DEFAULT: false - urlencode: (boolean) URL encode the json string DEFAULT: false
리턴 string The escaped string.

externalUrl() 공개 정적인 메소드

Returns an external link passed through the dereferrer to strip session IDs from the referrer.
public static externalUrl ( string $url, boolean $tag = false ) : string
$url string The external URL to link to.
$tag boolean If true, a complete tag is returned, only the url otherwise.
리턴 string The link to the dereferrer script.

getAccessKey() 공개 정적인 메소드

Returns an un-used access key from the label given.
public static getAccessKey ( string $label, boolean $nocheck = false, boolean $shutdown = false ) : string
$label string The label to choose an access key from.
$nocheck boolean Don't check if the access key already has been used?
$shutdown boolean Is this called as a shutdown function?
리턴 string A single lower case character access key, or an empty string if no key can be found.

getAccessKeyAndTitle() 공개 정적인 메소드

Returns the appropriate "accesskey" and "title" attributes for an HTML tag and the given label.
public static getAccessKeyAndTitle ( string $label, boolean $nocheck = false, boolean $return_array = false ) : string
$label string The title of an HTML element
$nocheck boolean Don't check if the access key already has been used?
$return_array boolean Return attributes as a hash?
리턴 string The title, and if appropriate, the accesskey attributes for the element.

getCacheUrl() 공개 정적인 메소드

Creates a URL for cached data.
public static getCacheUrl ( string $type, array $params = [] ) : Horde_Url
$type string The cache type ('app', 'css', 'js').
$params array Optional parameters: - app: REQUIRED for $type == 'app'. Identifies the application to call the 'cacheOutput' API call, which is passed in the value of the entire $params array (which may include parameters other than those listed here). The return from cacheOutput should be a 2-element array: 'data' (the cached data) and 'type' (the content-type of the data). - cid: REQUIRED for $type == 'css' || 'js'. The cacheid of the data (stored in Horde_Cache). - nocache: If true, sets the cache limiter to 'nocache' instead of the default 'public'.
리턴 Horde_Url The URL to the cache page.

getDriverConfig() 공개 정적인 메소드

Returns the driver parameters for the specified backend.
public static getDriverConfig ( mixed $backend, string $type = 'sql' ) : array
$backend mixed The backend system (e.g. 'prefs', 'categories', 'contacts') being used. The used configuration array will be $conf[$backend]. If an array gets passed, it will be $conf[$key1][$key2].
$type string The type of driver. If null, will not merge with base config.
리턴 array The connection parameters.

getTempDir() 공개 정적인 메소드

Determines the location of the system temporary directory. If a specific configuration cannot be found, it defaults to /tmp.
public static getTempDir ( ) : string
리턴 string A directory name that can be used for temp files. Returns false if one could not be found.

getTempFile() 공개 정적인 메소드

Creates a temporary filename for the lifetime of the script, and (optionally) registers it to be deleted at request shutdown.
public static getTempFile ( string $prefix = 'Horde', boolean $delete = true, string $dir = '', boolean $secure = false, boolean $session_remove = false ) : string
$prefix string Prefix to make the temporary name more recognizable.
$delete boolean Delete the file at the end of the request?
$dir string Directory to create the temporary file in.
$secure boolean If deleting file, should we securely delete the file?
$session_remove boolean Delete this file when session is destroyed?
리턴 string Returns the full path-name to the temporary file or false if a temporary file could not be created.

highlightAccessKey() 공개 정적인 메소드

Highlights an access key in a label.
public static highlightAccessKey ( string $label, string $accessKey ) : string
$label string The label to highlight the access key in.
$accessKey string The access key to highlight.
리턴 string The HTML version of the label with the access key highlighted.

isConnectionSecure() 공개 정적인 메소드

Is the current HTTP connection considered secure?
public static isConnectionSecure ( ) : boolean
리턴 boolean

label() 공개 정적인 메소드

Returns a label element including an access key for usage in conjuction with a form field. User preferences regarding access keys are respected.
public static label ( string $for, string $label, string $ak = null ) : string
$for string The form field's id attribute.
$label string The label text.
$ak string The access key to use. If null a new access key will be generated.
리턴 string The html code for the label element.

linkTooltip() 공개 정적인 메소드

Uses DOM Tooltips to display the 'title' attribute for link() calls.
public static linkTooltip ( string $url, string $status = '', string $class = '', string $target = '', string $onclick = '', string $title = '', string $accesskey = '', array $attributes = [] ) : string
$url string The full URL to be linked to
$status string The JavaScript mouse-over string
$class string The CSS class of the link
$target string The window target to point to.
$onclick string JavaScript action for the 'onclick' event.
$title string The link title (tooltip). Most not contain HTML data other than <br>, which will be converted to a linebreak.
$accesskey string The access key to use.
$attributes array Any other name/value pairs to add to the <a> tag.
리턴 string The full tag.

log() 공개 정적인 메소드

Shortcut to logging method.
또한 보기: Horde_Core_Log_Logger
public static log ( $event, $priority = null, array $options = [] )
$options array

logMessage() 공개 정적인 메소드

Shortcut to logging method.
또한 보기: log()
사용 중단: Use log() instead
public static logMessage ( $event, $priority = null, array $options = [] )
$options array

permissionDeniedError() 공개 정적인 메소드

Process a permission denied error, running a user-defined hook if necessary.
public static permissionDeniedError ( string $app, string $perm, string $error = null )
$app string Application name.
$perm string Permission name.
$error string An error message to output via the notification system.

popupJs() 공개 정적인 메소드

Output the javascript needed to call the popup JS function.
public static popupJs ( string | Horde_Url $url, array $options = [] ) : string
$url string | Horde_Url The page to load.
$options array Additional options: - height: (integer) The height of the popup window. DEFAULT: 650px - menu: (boolean) Show the browser menu in the popup window? DEFAULT: false - onload: (string) A JS function to call after the popup window is fully loaded. DEFAULT: None - params: (array) Additional parameters to pass to the URL. DEFAULT: None - urlencode: (boolean) URL encode the json string? DEFAULT: false - width: (integer) The width of the popup window. DEFAULT: 700 px
리턴 string The javascript needed to call the popup code.

redirect() 공개 정적인 메소드

Utility function to send redirect headers to browser, handling any browser quirks.
public static redirect ( string $url )
$url string The URL to redirect to.

requireSecureConnection() 공개 정적인 메소드

Throws an exception if not using a secure connection.
public static requireSecureConnection ( )

selfUrl() 공개 정적인 메소드

Returns a session-id-ified version of $SCRIPT_NAME resp. $PHP_SELF.
public static selfUrl ( boolean $script_params = false, boolean $nocache = true, boolean $full = false, boolean $force_ssl = false ) : Horde_Url
$script_params boolean Include script parameters like QUERY_STRING and PATH_INFO? (Deprecated: use Horde::selfUrlParams() instead.)
$nocache boolean Include a cache-buster parameter in the URL?
$full boolean Return a full URL?
$force_ssl boolean Ignore $conf['use_ssl'] and force creation of a SSL URL?
리턴 Horde_Url The requested URL.

selfUrlParams() 공개 정적인 메소드

Create a self URL of the current page, building the parameter list from the current Horde_Variables object (or via another Variables object passed as an optional argument) rather than the original request data.
부터: 2.3.0
public static selfUrlParams ( array $opts = [] ) : Horde_Url
$opts array Additional options: - force_ssl: (boolean) Force creation of an SSL URL? DEFAULT: false - full: (boolean) Return a full URL? DEFAULT: false - nocache: (boolean) Include a cache-buster parameter in the URL? DEFAULT: true - vars: (Horde_Variables) Use this Horde_Variables object instead of the Horde global object. DEFAULT: Use the Horde global object.
리턴 Horde_Url The self URL.

sidebar() 공개 정적인 메소드

Returns the sidebar for the current application.
public static sidebar ( string $app = null ) : Horve_View_Sidebar
$app string The application to generate the menu for. Defaults to the current app.
리턴 Horve_View_Sidebar The sidebar.

signQueryString() 공개 정적인 메소드

Add a signature + timestamp to a query string and return the signed query string.
public static signQueryString ( mixed $queryString, integer $now = null ) : mixed
$queryString mixed The query string (or Horde_Url object) to sign.
$now integer The timestamp at which to sign. Leave blank for generating signatures; specify when testing.
리턴 mixed The signed query string (or Horde_Url object).

startBuffer() 공개 정적인 메소드

Start buffering output.
public static startBuffer ( )

stripAccessKey() 공개 정적인 메소드

For multibyte charset strings the access key gets removed completely, otherwise only the underscore gets removed.
public static stripAccessKey ( string $label ) : string
$label string The label containing an access key.
리턴 string The label with the access key being stripped.

url() 공개 정적인 메소드

If a full URL is requested, all parameter separators get converted to "&", otherwise to "&".
public static url ( mixed $uri, boolean $full = false, mixed $opts = [] ) : Horde_Url
$uri mixed The URI to be modified (either a string or any object with a __toString() function).
$full boolean Generate a full (http://server/path/) URL.
$opts mixed Additional options. If a string/integer, it is taken to be the 'append_session' option. If an array, one of the following: - app: (string) Use this app for the webroot. DEFAULT: current application - append_session: (integer) 0 = only if needed [DEFAULT], 1 = always, -1 = never. - force_ssl: (boolean) Ignore $conf['use_ssl'] and force creation of a SSL URL? DEFAULT: false
리턴 Horde_Url The URL with the session id appended (if needed).

verifySignedQueryString() 공개 정적인 메소드

Verify a signature and timestamp on a query string.
public static verifySignedQueryString ( string $data, integer $now = null ) : boolean
$data string The signed query string.
$now integer The current time (can override for testing).
리턴 boolean Whether or not the string was valid.

webServerID() 공개 정적인 메소드

PHP string list built from the PHP 'configure' script.
또한 보기: php_sapi_name()
public static webServerID ( ) : string
리턴 string A web server identification string.

widget() 공개 정적인 메소드

Returns an anchor sequence with the relevant parameters for a widget with accesskey and text.
public static widget ( array $params ) : string
$params array A hash with widget options (other options will be passed as attributes to the link tag): - url: (string) The full URL to be linked to. - title: (string) The link title/description. - nocheck: (boolean, optional) Don't check if the accesskey already already has been used. Defaults to false (= check).
리턴 string The full Title sequence.

wrapInlineScript() 공개 정적인 메소드

Print inline javascript to output buffer after wrapping with necessary javascript tags.
public static wrapInlineScript ( array $script ) : string
$script array The script to output.
리턴 string The script with the necessary HTML javascript tags appended.

프로퍼티 상세

$_bufferLevel 보호되어 있는 정적으로 프로퍼티

The current buffer level.
protected static int $_bufferLevel
리턴 integer

$_contentSent 보호되어 있는 정적으로 프로퍼티

Has content been sent at the base buffer level?
protected static bool $_contentSent
리턴 boolean

$_labels 보호되어 있는 정적으로 프로퍼티

The labels already used in this page.
protected static array $_labels
리턴 array

$_noAccessKey 보호되어 있는 정적으로 프로퍼티

Are accesskeys supported on this system.
protected static bool $_noAccessKey
리턴 boolean

$_used 보호되어 있는 정적으로 프로퍼티

The access keys already used in this page.
protected static array $_used
리턴 array