PHP Class Ansel_ImageGenerator, horde
New thumbnail generators can be dropped in and will be made available by
Ansel providing:
1. The class name is as: Ansel_ImageGenerator_{type}Thumb and filename
matches, i.e. {type}Thumb.php where {type} is the unique name for your
thumbnail type.
2. Implements a _create() method that applies the effects to the image
(see existing generators for how this works).
3. If a matching "stack" generator is desired, that should be named
similarly: Ansel_ImageGenerator_{type}ThumbStack with matching filename:
{type}ThumbStack.php
Copyright 2007-2016 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (GPL). If you
did not receive this file, see http://www.horde.org/licenses/gpl.
Mostra file
Open project: horde/horde
Class Usage Examples
Public Properties
Property |
Type |
Description |
|
$need |
array |
Array of required, supported features for this ImageGenerator to work |
|
$title |
string |
Human readable title for this thumbnail style. |
|
Protected Properties
Public Methods
Method |
Description |
|
__construct ( $params ) : Horde_ImageGenerator |
Const'r |
|
create ( ) : mixed |
Create and cache the view. |
|
factory ( string $type, array $params = [] ) : Ansel_ImageGenerator |
Horde_ImageGenerator factory |
|
Protected Methods
Method |
Description |
|
_getStackImages ( ) : array |
Utility function to return an array of Horde_Images to use in building a
stack. Returns a random set of 5 images from the gallery, or the
explicitly set key image plus 4 others. |
|
Method Details
__construct()
public method
public __construct ( $params ) : Horde_ImageGenerator |
return |
Horde_ImageGenerator |
|
_getStackImages()
protected method
Utility function to return an array of Horde_Images to use in building a
stack. Returns a random set of 5 images from the gallery, or the
explicitly set key image plus 4 others.
Create and cache the view.
public create ( ) : mixed |
return |
mixed |
Views used as gallery key images return Horde_Image,
other views return boolean |
factory()
public static method
Horde_ImageGenerator factory
public static factory ( string $type, array $params = [] ) : Ansel_ImageGenerator |
$type |
string |
The type of concrete instance to return. |
$params |
array |
Additional parameters needed for the instance. |
return |
Ansel_ImageGenerator |
|
Property Details
$_dimensions protected_oe property
protected array $_dimensions |
return |
array |
|
$_image protected_oe property
Ansel_Image object that this view is created from.
protected Ansel_Image $_image |
return |
Ansel_Image |
|
$_params protected_oe property
protected array $_params |
return |
array |
|
$_style protected_oe property
protected Ansel_Style $_style |
return |
Ansel_Style |
|
Array of required, supported features for this ImageGenerator to work
public array $need |
return |
array |
|
$title public_oe property
Human readable title for this thumbnail style.
public string $title |
return |
string |
|