PHP 클래스 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.
파일 보기
프로젝트 열기: horde/horde
1 사용 예제들
공개 프로퍼티들
프로퍼티 |
타입 |
설명 |
|
$need |
array |
Array of required, supported features for this ImageGenerator to work |
|
$title |
string |
Human readable title for this thumbnail style. |
|
보호된 프로퍼티들
공개 메소드들
메소드 |
설명 |
|
__construct ( $params ) : Horde_ImageGenerator |
Const'r |
|
create ( ) : mixed |
Create and cache the view. |
|
factory ( string $type, array $params = [] ) : Ansel_ImageGenerator |
Horde_ImageGenerator factory |
|
보호된 메소드들
메소드 |
설명 |
|
_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. |
|
메소드 상세
public __construct ( $params ) : Horde_ImageGenerator |
리턴 |
Horde_ImageGenerator |
|
_getStackImages()
보호된 메소드
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 |
리턴 |
mixed |
Views used as gallery key images return Horde_Image,
other views return boolean |
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. |
리턴 |
Ansel_ImageGenerator |
|
프로퍼티 상세
$_dimensions 보호되어 있는 프로퍼티
protected array $_dimensions |
리턴 |
array |
|
Ansel_Image object that this view is created from.
protected Ansel_Image $_image |
리턴 |
Ansel_Image |
|
protected array $_params |
리턴 |
array |
|
protected Ansel_Style $_style |
리턴 |
Ansel_Style |
|
Array of required, supported features for this ImageGenerator to work
public array $need |
리턴 |
array |
|
Human readable title for this thumbnail style.
public string $title |
리턴 |
string |
|