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.
저자: Michael J. Rubinsky ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$need array Array of required, supported features for this ImageGenerator to work
$title string Human readable title for this thumbnail style.

보호된 프로퍼티들

프로퍼티 타입 설명
$_dimensions array Image dimensions
$_image Ansel_Image Ansel_Image object that this view is created from.
$_params array Parameters for this view
$_style Ansel_Style Cache the 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.

메소드 상세

__construct() 공개 메소드

Const'r
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.
protected _getStackImages ( ) : array
리턴 array An array of Horde_Image objects.

create() 공개 메소드

Create and cache the view.
public create ( ) : mixed
리턴 mixed Views used as gallery key images return Horde_Image, other views return boolean

factory() 공개 정적인 메소드

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 보호되어 있는 프로퍼티

Image dimensions
protected array $_dimensions
리턴 array

$_image 보호되어 있는 프로퍼티

Ansel_Image object that this view is created from.
protected Ansel_Image $_image
리턴 Ansel_Image

$_params 보호되어 있는 프로퍼티

Parameters for this view
protected array $_params
리턴 array

$_style 보호되어 있는 프로퍼티

Cache the style
protected Ansel_Style $_style
리턴 Ansel_Style

$need 공개적으로 프로퍼티

Array of required, supported features for this ImageGenerator to work
public array $need
리턴 array

$title 공개적으로 프로퍼티

Human readable title for this thumbnail style.
public string $title
리턴 string