PHP Класс Newscoop\Image\Rendition

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

Защищенные свойства (Protected)

Свойство Тип Описание
$coords string
$height integer
$label string
$name string
$offset integer
$specs string
$width integer

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

Метод Описание
__construct ( integer $width, integer $height, string $specs = 'fit', string $name = null, integer $offset = null, string $label = null )
__toString ( ) : string
fits ( Newscoop\Image\ImageInterface $image ) : boolean Test if rendition fits image
generateImage ( string $imagePath ) : Imagine\Gd\Image Generate image
getAspectRatio ( ) : float Get aspect ratio
getHeight ( ) : integer Get height
getInfo ( ) : string Get info
getLabel ( ) : string Get label
getMinSize ( Newscoop\Image\ImageInterface $image ) : array Get min size
getName ( ) : string Get name
getPreview ( integer $width, integer $height ) : Newscoop\Image\Rendition Get preview
getSelectArea ( Newscoop\Image\ImageInterface $image ) : array Get select area
getSpecs ( ) : string Get specification
getThumbnail ( Newscoop\Image\ImageInterface $image, ImageService $imageService ) : Newscoop\Image\Thumbnail Get thumbnail
getWidth ( ) : void Get width
isCrop ( ) : boolean Test if is crop defined
setCoords ( string $coords ) : void Set coordinates for image
setHeight ( integer $height ) : void Set height
setLabel ( string $label ) : void Set label
setOffset ( integer $offset ) : void Set offset
setSpecs ( string $specs ) : void Set specification
setWidth ( integer $width ) : void Set width

Приватные методы

Метод Описание
getFlags ( ) : integer Get flags

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

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

public __construct ( integer $width, integer $height, string $specs = 'fit', string $name = null, integer $offset = null, string $label = null )
$width integer
$height integer
$specs string
$name string
$offset integer
$label string

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

public __toString ( ) : string
Результат string

fits() публичный метод

Test if rendition fits image
public fits ( Newscoop\Image\ImageInterface $image ) : boolean
$image Newscoop\Image\ImageInterface
Результат boolean

generateImage() публичный метод

Generate image
public generateImage ( string $imagePath ) : Imagine\Gd\Image
$imagePath string
Результат Imagine\Gd\Image

getAspectRatio() публичный метод

Get aspect ratio
public getAspectRatio ( ) : float
Результат float

getHeight() публичный метод

Get height
public getHeight ( ) : integer
Результат integer

getInfo() публичный метод

Get info
public getInfo ( ) : string
Результат string

getLabel() публичный метод

Get label
public getLabel ( ) : string
Результат string

getMinSize() публичный метод

Get min size
public getMinSize ( Newscoop\Image\ImageInterface $image ) : array
$image Newscoop\Image\ImageInterface
Результат array

getName() публичный метод

Get name
public getName ( ) : string
Результат string

getPreview() публичный метод

Get preview
public getPreview ( integer $width, integer $height ) : Newscoop\Image\Rendition
$width integer
$height integer
Результат Newscoop\Image\Rendition

getSelectArea() публичный метод

Get select area
public getSelectArea ( Newscoop\Image\ImageInterface $image ) : array
$image Newscoop\Image\ImageInterface
Результат array

getSpecs() публичный метод

Get specification
public getSpecs ( ) : string
Результат string

getThumbnail() публичный метод

Get thumbnail
public getThumbnail ( Newscoop\Image\ImageInterface $image, ImageService $imageService ) : Newscoop\Image\Thumbnail
$image Newscoop\Image\ImageInterface
$imageService ImageService
Результат Newscoop\Image\Thumbnail

getWidth() публичный метод

Get width
public getWidth ( ) : void
Результат void

isCrop() публичный метод

Test if is crop defined
public isCrop ( ) : boolean
Результат boolean

setCoords() публичный метод

Set coordinates for image
public setCoords ( string $coords ) : void
$coords string
Результат void

setHeight() публичный метод

Set height
public setHeight ( integer $height ) : void
$height integer
Результат void

setLabel() публичный метод

Set label
public setLabel ( string $label ) : void
$label string
Результат void

setOffset() публичный метод

Set offset
public setOffset ( integer $offset ) : void
$offset integer
Результат void

setSpecs() публичный метод

Set specification
public setSpecs ( string $specs ) : void
$specs string
Результат void

setWidth() публичный метод

Set width
public setWidth ( integer $width ) : void
$width integer
Результат void

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

$coords защищенное свойство

protected string $coords
Результат string

$height защищенное свойство

protected int $height
Результат integer

$label защищенное свойство

protected string $label
Результат string

$name защищенное свойство

protected string $name
Результат string

$offset защищенное свойство

protected int $offset
Результат integer

$specs защищенное свойство

protected string $specs
Результат string

$width защищенное свойство

protected int $width
Результат integer