Class: Image
Source Location: /myphp-1.9/myphp-1.9-base/html/util/Image.php
Class Image
Class Overview
|
Returns a complete Image as HTML
- <img src="$src" width="$width" height="$height"
- alt="$alt" class="$class" border="$border" />
- Usage:
- $image = new Image($src,$width,$height,$alt,$class,$border,$aux);
- print $image->getHtml();
- Or
- Image::display($src,$width,$height,$alt,$class,$border,$aux);
Located in /myphp-1.9/myphp-1.9-base/html/util/Image.php [line 34]
Object
|
--Html
|
--Image
|
Properties
|
Methods
|
Direct descendents
| Images |
Returns a complete Image as HTML
|
Inherited Properties, Constants, and Methods
Method Summary
| Image |
Image() |
Constructor |
| String |
getHtml() |
Get the complete html for an image |
Methods
Image Image(
[String
$src = ''], [String
$width = ''], [String
$height = ''], [String
$alt = ''], [String
$class = ''], [String
$border = ''], [String
$aux = '']
)
|
|
Constructor
Parameters:
|
String |
$src: |
The source path for the image i.e. /logo.gif |
|
String |
$width: |
The width |
|
String |
$height: |
The height |
|
String |
$alt: |
The alt text |
|
String |
$class: |
The css class for the image |
|
String |
$border: |
The border of an image |
|
String |
$aux: |
The new line indicator (nl) |
API Tags:
| Global: | String 0: IMAGE_SKIN_URL Defines the relative sub url from docroot |
| Global: | String 1: PROJECT_PATH Defines the full path on the disk to the Project docroot |
void calculateWidthHeight(
)
|
|
Calculate the width and height, if not specified
void display(
[String
$src = ''], [String
$width = ''], [String
$height = ''], [String
$alt = ''], [String
$class = ''], [String
$border = ''], [String
$aux = '']
)
|
|
Display html
- Usage:
- Image::display($src,$width,$height,$alt,$class,$border,$aux);
Parameters:
|
String |
$src: |
The source path for the image |
|
String |
$width: |
The width |
|
String |
$height: |
The height |
|
String |
$alt: |
The alt text |
|
String |
$class: |
The css class for the image |
|
String |
$border: |
The border of an image |
|
String |
$aux: |
The new line indicator (nl) |
API Tags:
Redefinition of:
- Html::display()
- Display the html
Redefined in descendants as:
Get the complete html for an image
API Tags:
Redefinition of:
- Html::getHtml()
- Get Html
|
|