PHP Class Horde_Deprecated, horde

Author: Michael Slusarz ([email protected])
显示文件 Open project: horde/horde

Public Methods

Method Description
base64ImgData ( mixed $in, integer $limit = null ) : string Generate RFC 2397-compliant image data strings.
callHook ( string $hook, array $args = [], string $app = 'horde' ) : mixed Call a Horde hook, handling all of the necessary lookups and parsing of the hook code.
fullSrcImg ( $src, array $opts = [] ) Same as img(), but returns a full source url for the image.
hookExists ( string $hook, string $app = 'horde' ) : boolean Returns whether a hook exists.
img ( mixed $src, string $alt = '', mixed $attr = '' ) : string Constructs a correctly-pathed tag to an image.
initMap ( array $params = [] ) Initialize a HordeMap.
loadConfiguration ( string $config_file, string | array $var_names = null, string $app = null, boolean $show_output = false ) : mixed Loads global and vhost specific configuration files.
prepareResponse ( mixed $data = null, boolean $notify = false ) : object Returns a response object with added notification information.
sendHTTPResponse ( mixed $data, string $ct ) Send response data to browser.

Method Details

base64ImgData() public static method

Generate RFC 2397-compliant image data strings.
Deprecation: Use Horde_Themes_Image::base64ImgData()
public static base64ImgData ( mixed $in, integer $limit = null ) : string
$in mixed URI or Horde_Themes_Image object containing image data.
$limit integer Sets a hard size limit for image data; if exceeded, will not string encode.
return string The string to use in the image 'src' attribute; either the image data if the browser supports, or the URI if not.

callHook() public static method

WARNING: Throwing exceptions is expensive, so use callHook() with care and cache the results if you going to use the results more than once.
Deprecation: Use Horde_Core_Hooks object instead.
public static callHook ( string $hook, array $args = [], string $app = 'horde' ) : mixed
$hook string The function to call.
$args array An array of any arguments to pass to the hook function.
$app string The hook application.
return mixed The results of the hook.

fullSrcImg() public static method

Useful for when the image may be part of embedded Horde content on an external site.
See also: img()
Deprecation: Use Horde_Themes_Image::tag()
public static fullSrcImg ( $src, array $opts = [] )
$opts array

hookExists() public static method

Use this if you have to call a hook many times and expect the hook to not exist.
Deprecation: Use Horde_Core_Hooks object instead.
public static hookExists ( string $hook, string $app = 'horde' ) : boolean
$hook string The function to call.
$app string The hook application.
return boolean True if the hook exists.

img() public static method

Constructs a correctly-pathed tag to an image.
Deprecation: Use Horde_Themes_Image::tag()
public static img ( mixed $src, string $alt = '', mixed $attr = '' ) : string
$src mixed The image file (either a string or a Horde_Themes_Image object).
$alt string Text describing the image.
$attr mixed Any additional attributes for the image tag. Can be a pre-built string or an array of key/value pairs that will be assembled and html-encoded.
return string The full image tag.

initMap() public static method

Initialize a HordeMap.
Deprecation: Call Horde_Core_HordeMap::init() instead.
public static initMap ( array $params = [] )
$params array

loadConfiguration() public static method

Loads global and vhost specific configuration files.
Deprecation: Use Horde_Registry#loadConfigFile() instead.
public static loadConfiguration ( string $config_file, string | array $var_names = null, string $app = null, boolean $show_output = false ) : mixed
$config_file string The name of the configuration file.
$var_names string | array The name(s) of the variable(s) that is/are defined in the configuration file.
$app string The application. Defaults to the current application.
$show_output boolean If true, the contents of the requested config file are simply output instead of loaded into a variable.
return mixed The value of $var_names, in a compact()'ed array if $var_names is an array.

prepareResponse() public static method

Returns a response object with added notification information.
Deprecation:
public static prepareResponse ( mixed $data = null, boolean $notify = false ) : object
$data mixed The 'response' data.
$notify boolean If true, adds notification info to object.
return object The Horde JSON response. It has the following properties: - msgs: (array) [OPTIONAL] List of notification messages. - response: (mixed) The response data for the request.

sendHTTPResponse() public static method

Send response data to browser.
Deprecation:
public static sendHTTPResponse ( mixed $data, string $ct )
$data mixed The data to serialize and send to the browser.
$ct string The content-type to send the data with. Either 'json', 'js-json', 'html', 'plain', and 'xml'.