PHP Класс Thumb

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$defaults
$destination
$drivers
$error
$options
$result
$source

Открытые методы

Метод Описание
__call ( string $method, mixed $arguments ) : mixed Makes all public methods of the result object available to the thumb class
__construct ( mixed $source, array $params = [] ) Constructor
__toString ( ) Makes it possible to echo the entire object
destination ( ) : Obj Build the destination object
error ( ) : Exception Returns the exception if available
isObsolete ( ) : boolean Checks if the thumbnail is not needed because the original image is small enough
isThere ( ) : boolean Checks if the thumbnail already exists and is newer than the original file
params ( array $params ) : array Makes it possible to pass a string of params which is shorter and more convenient than passing a full array of keys and values: width:300|height:200|crop:true
settingsIdentifier ( ) : string Builds a hash for all relevant settings
source ( ) : Media Returns the source media object
tag ( array $attr = [] ) : string Generates and returns the full html tag for the thumbnail

Защищенные методы

Метод Описание
create ( ) Calls the driver function and creates the thumbnail

Описание методов

__call() публичный Метод

Makes all public methods of the result object available to the thumb class
public __call ( string $method, mixed $arguments ) : mixed
$method string
$arguments mixed
Результат mixed

__construct() публичный Метод

Constructor
public __construct ( mixed $source, array $params = [] )
$source mixed
$params array

__toString() публичный Метод

Makes it possible to echo the entire object
public __toString ( )

create() защищенный Метод

Calls the driver function and creates the thumbnail
protected create ( )

destination() публичный Метод

Build the destination object
public destination ( ) : Obj
Результат Obj

error() публичный Метод

Returns the exception if available
public error ( ) : Exception
Результат Exception

isObsolete() публичный Метод

Checks if the thumbnail is not needed because the original image is small enough
public isObsolete ( ) : boolean
Результат boolean

isThere() публичный Метод

Checks if the thumbnail already exists and is newer than the original file
public isThere ( ) : boolean
Результат boolean

params() публичный Метод

Makes it possible to pass a string of params which is shorter and more convenient than passing a full array of keys and values: width:300|height:200|crop:true
public params ( array $params ) : array
$params array
Результат array

settingsIdentifier() публичный Метод

Builds a hash for all relevant settings
public settingsIdentifier ( ) : string
Результат string

source() публичный Метод

Returns the source media object
public source ( ) : Media
Результат Media

tag() публичный Метод

Generates and returns the full html tag for the thumbnail
public tag ( array $attr = [] ) : string
$attr array An optional array of attributes, which should be added to the image tag
Результат string

Описание свойств

$defaults публичное статическое свойство

public static $defaults

$destination публичное свойство

public $destination

$drivers публичное статическое свойство

public static $drivers

$error публичное свойство

public $error

$options публичное свойство

public $options

$result публичное свойство

public $result

$source публичное свойство

public $source