Creates thumbnail from image. More...
Public Member Functions | |
__construct ($args) | |
Constructor. | |
get_full_path () | |
Get the full path (including the file name) | |
get_full_path_thumb () | |
Get the full path for the thumbnail (including the file name) | |
get_image_url () | |
Returns the required relative path. | |
![]() | |
__call ($function, $params) | |
The 'magic' call method will get/set for us invoked when the interpreter can not find a method the user is asking for. | |
set_parameters ($arguments) | |
Set variables from an array to member fields requires $this->optional_arguments or $this->required_arguments to have been set by the subclass. |
Static Public Member Functions | |
static | image_newer ($img1, $img2) |
Determines if img1 is newer(modifed later) than img2. | |
static | get_thumbnail_dimensions ($original, $constraints=array(), $absolute=array()) |
Get the dimensions of the thumbnail. |
Protected Attributes | |
$required_arguments = array('url') | |
set required variables (see Base) | |
$optional_arguments = array('width', 'height', 'square', 'x', 'y', 'truncate') | |
set optional variables (see Base) | |
$server_path = '' | |
complete path on server (e.g. '/var/www/...') | |
$rel_path = '' | |
path relative to html root (e.g. '/images/...') | |
$server_path_thumb = '' | |
complate path on server to thumbnail | |
$rel_path_thumb = '' | |
path relative to html root for thumbnail | |
$file_name = '' | |
file name | |
$extension = '' | |
extension | |
![]() |
Private Member Functions | |
set_thumb_path () | |
Set the thumbnail paths. | |
need_to_create_thumb () | |
Checks to see if we need to create the thumb or not. | |
create_thumbnail () | |
Creates the thumbnail and returns the relative path. |
Creates thumbnail from image.
|
static |
Get the dimensions of the thumbnail.
Returns an array('width'=>100, 'height'=>100)