PHP 클래스 Newscoop\Image\Rendition

파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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