Horde_Themes_Image
extends Horde_Themes_Element
in package
An object-oriented interface to a themed image.
Tags
Table of Contents
Properties
- $app : string
- Current application name.
- $base64img : string
- $fs : string
- $fulluri : string
- $uri : string
- $_data : array<string|int, mixed>
- URI/filesystem path values.
- $_dirname : string
- The default directory name for this element type.
- $_name : string
- Element name.
- $_opts : array<string|int, mixed>
- Options.
Methods
- __construct() : mixed
- Constructor.
- __get() : mixed
- __toString() : string
- String representation of this object.
- base64ImgData() : mixed
- fromUri() : Horde_Themes_Element
- Convert a URI into a Horde_Themes_Element object.
- tag() : string
- Constructs a correctly-pathed tag to an image.
Properties
$app
Current application name.
public
string
$app
$base64img read-only
public
string
$base64img
See Horde_Themes_Image::base64ImgData() (since 2.10.0).
$fs read-only
public
string
$fs
Filesystem location.
$fulluri read-only
public
string
$fulluri
Full URI.
$uri read-only
public
string
$uri
Relative URI.
$_data
URI/filesystem path values.
protected
array<string|int, mixed>
$_data
= array()
$_dirname
The default directory name for this element type.
protected
string
$_dirname
= 'graphics'
$_name
Element name.
protected
string
$_name
$_opts
Options.
protected
array<string|int, mixed>
$_opts
Methods
__construct()
Constructor.
public
__construct([string $name = '' ][, array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $name : string = ''
-
The element name. If null, will return the element directory.
- $options : array<string|int, mixed> = array()
-
Additional options:
- app: (string) Use this application instead of the current app.
- data: (array) Contains 2 elements: 'fs' - filesystem path, 'uri' - the element URI. If set, use as the data values instead of auto determining.
- nohorde: (boolean) If true, do not fallback to horde for element.
- noview: (boolean) If true, do not load images from view-specific directories. (Since 2.4.0)
- theme: (string) Use this theme instead of the Horde default.
- uri: (string) Use this as the URI value.
__get()
public
__get(mixed $name) : mixed
Parameters
- $name : mixed
__toString()
String representation of this object.
public
__toString() : string
Return values
string —The relative URI.
base64ImgData()
public
static base64ImgData(mixed $in[, mixed $limit = null ]) : mixed
Parameters
- $in : mixed
- $limit : mixed = null
fromUri()
Convert a URI into a Horde_Themes_Element object.
public
static fromUri(string $uri) : Horde_Themes_Element
Parameters
- $uri : string
-
The URI to convert.
Return values
Horde_Themes_Element —A theme element object.
tag()
Constructs a correctly-pathed tag to an image.
public
static tag(mixed $src[, array<string|int, mixed> $opts = array() ]) : string
Parameters
- $src : mixed
-
The image file (either a string or a Horde_Themes_Image object).
- $opts : array<string|int, mixed> = array()
-
Additional options:
- 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.
- fullsrc: (boolean) TODO
- imgopts: (array) TODO
Return values
string —The full image tag.