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. |
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. |
public static fullSrcImg ( $src, array $opts = [] ) | ||
$opts | array |
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. |
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. |
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. |
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'. |