Class image

Description

Image class A class for managing a standard image.

Located in /image-defs.php (line 37)

RenderableObject
   |
   --image
Variable Summary
 mixed $align
 mixed $alt
 mixed $border
 mixed $height
 mixed $hspace
 mixed $map
 mixed $name
 mixed $onmouseout
 mixed $onmouseover
 mixed $src
 mixed $vspace
 mixed $width
Method Summary
 image image (string $name, string $src, string $alt, integer $width, integer $height, integer $border, integer $hspace, integer $vspace, [string $align = ""])
 string html ()
 string javascript ()
 void set_linkover_text (string $txt)
 void set_src (string $src, integer $width, integer $height, integer $border, integer $hspace, integer $vspace, [string $align = ""])
 void use_map (string $map)
 string wml ()
Variables
mixed $align = "" (line 56)

Image alignment with respect to the page:

'left' (default), 'right', 'top', 'bottom', 'middle', 'absbottom', 'absmiddle', 'baseline', 'texttop'

mixed $alt = "" (line 41)

Image ALT tag content

mixed $border = 0 (line 58)

Image border with in pixels

mixed $height = 0 (line 47)

Height of image in pixels

mixed $hspace = 0 (line 49)

Padding at image sides in pixels

mixed $linkover_text = "" (line 64)

Text to display in status area when mouse over image

mixed $map = "" (line 66)

Image map to use

mixed $name = "" (line 39)

Name of the image element

mixed $onmouseout = "" (line 62)

Script to execute on mouse-out

mixed $onmouseover = "" (line 60)

Script to execute on mouse-over

mixed $src = "" (line 43)

Image file source URL/path

mixed $vspace = 0 (line 51)

Padding at image top & bottom in pixels

mixed $width = 0 (line 45)

Width of image in pixels

Methods
Constructor image (line 81)

Constructor Creates the basic image object.

image image (string $name, string $src, string $alt, integer $width, integer $height, integer $border, integer $hspace, integer $vspace, [string $align = ""])
  • string $name: Name of this image element
  • string $src: URL or path to the actual image file
  • string $alt: Image ALT tag content
  • integer $width: Width of the image in pixels
  • integer $height: Height of the image in pixels
  • integer $border: Size of border around the image in pixels
  • integer $hspace: Padding to left & right of image in pixels
  • integer $vspace: Padding top & bottom of image in pixels
  • string $align: Alignment of image with respect to the page
html (line 158)

This renders the field as HTML.

  • return: The field as HTML.
string html ()

Redefinition of:
RenderableObject::html()
Return output suitable for normal HTML-capable device. This method must be over-ridden by a method of the same name in the descendant class which renders output to web browsers.
javascript (line 137)

Render image as javascript object

  • return: Javascript code rendering of this image
string javascript ()
set_linkover_text (line 120)

Set linkover text Defines the text to show when the mouse moves over the image.

void set_linkover_text (string $txt)
  • string $txt: Text to show in status area when mouse-over.
set_src (line 104)

Set image details Allow setting of src and metrics from outside.

void set_src (string $src, integer $width, integer $height, integer $border, integer $hspace, integer $vspace, [string $align = ""])
  • string $src: URL or path to the actual image file
  • integer $width: Width of the image in pixels
  • integer $height: Height of the image in pixels
  • integer $border: Size of border around the image in pixels
  • integer $hspace: Padding to left & right of image in pixels
  • integer $vspace: Padding top & bottom of image in pixels
  • string $align: Alignment of image with respect to the page
use_map (line 129)

Set image map Defines the image map to use with this image.

void use_map (string $map)
  • string $map: The name of the image map to associate with this image.
wml (line 150)

This renders the field as WML.

  • return: The field as WML.
string wml ()

Redefinition of:
RenderableObject::wml()
Return output suitable for normal wap-capable device. This method must be over-ridden by a method of the same name in the descendant class which renders output to wap devices.

Inherited Methods

Inherited From RenderableObject

 RenderableObject::RenderableObject()
 RenderableObject::html()
 RenderableObject::render()
 RenderableObject::wml()
 RenderableObject::wmlup()
 RenderableObject::xml()

Documentation generated by phpDocumentor 1.3.0RC3