\Horde_Themes_Image

An object-oriented interface to a themed image.

Summary

Methods
Properties
Constants
__construct()
__toString()
__get()
fromUri()
tag()
base64ImgData()
$app
$base64img
$fs
$fulluri
$uri
No constants found
No protected methods found
$_data
$_dirname
$_name
$_opts
N/A
No private methods found
No private properties found
N/A

Properties

$app

$app : string

Current application name.

Type

string

$base64img

$base64img : string

See Horde_Themes_Image::base64ImgData() (since 2.10.0).

Type

string

$fs

$fs : string

Filesystem location.

Type

string

$fulluri

$fulluri : string

Full URI.

Type

string

$uri

$uri : string

Relative URI.

Type

string

$_data

$_data : array

URI/filesystem path values.

Type

array

$_dirname

$_dirname : string

The default directory name for this element type.

Type

string

$_name

$_name : string

Element name.

Type

string

$_opts

$_opts : array

Options.

Type

array

Methods

__construct()

__construct(string  $name = '', array  $options = array()) 

Constructor.

Parameters

string $name

The element name. If null, will return the element directory.

array $options

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.

__toString()

__toString() : string

String representation of this object.

Returns

string —

The relative URI.

__get()

__get(  $name) 

Parameters

$name

fromUri()

fromUri(string  $uri) : \Horde_Themes_Element

Convert a URI into a Horde_Themes_Element object.

Parameters

string $uri

The URI to convert.

Returns

\Horde_Themes_Element

A theme element object.

tag()

tag(mixed  $src, array  $opts = array()) : string

Constructs a correctly-pathed tag to an image.

Parameters

mixed $src

The image file (either a string or a Horde_Themes_Image object).

array $opts

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

Returns

string —

The full image tag.

base64ImgData()

base64ImgData(  $in,   $limit = null) 

Parameters

$in
$limit