PHP Class Newscoop\Image\Rendition

Afficher le fichier Open project: sourcefabric/newscoop Class Usage Examples

Protected Properties

Свойство Type Description
$coords string
$height integer
$label string
$name string
$offset integer
$specs string
$width integer

Méthodes publiques

Méthode Description
__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

Private Methods

Méthode Description
getFlags ( ) : integer Get flags

Method Details

__construct() public méthode

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 méthode

public __toString ( ) : string
Résultat string

fits() public méthode

Test if rendition fits image
public fits ( Newscoop\Image\ImageInterface $image ) : boolean
$image Newscoop\Image\ImageInterface
Résultat boolean

generateImage() public méthode

Generate image
public generateImage ( string $imagePath ) : Imagine\Gd\Image
$imagePath string
Résultat Imagine\Gd\Image

getAspectRatio() public méthode

Get aspect ratio
public getAspectRatio ( ) : float
Résultat float

getHeight() public méthode

Get height
public getHeight ( ) : integer
Résultat integer

getInfo() public méthode

Get info
public getInfo ( ) : string
Résultat string

getLabel() public méthode

Get label
public getLabel ( ) : string
Résultat string

getMinSize() public méthode

Get min size
public getMinSize ( Newscoop\Image\ImageInterface $image ) : array
$image Newscoop\Image\ImageInterface
Résultat array

getName() public méthode

Get name
public getName ( ) : string
Résultat string

getPreview() public méthode

Get preview
public getPreview ( integer $width, integer $height ) : Newscoop\Image\Rendition
$width integer
$height integer
Résultat Newscoop\Image\Rendition

getSelectArea() public méthode

Get select area
public getSelectArea ( Newscoop\Image\ImageInterface $image ) : array
$image Newscoop\Image\ImageInterface
Résultat array

getSpecs() public méthode

Get specification
public getSpecs ( ) : string
Résultat string

getThumbnail() public méthode

Get thumbnail
public getThumbnail ( Newscoop\Image\ImageInterface $image, ImageService $imageService ) : Newscoop\Image\Thumbnail
$image Newscoop\Image\ImageInterface
$imageService ImageService
Résultat Newscoop\Image\Thumbnail

getWidth() public méthode

Get width
public getWidth ( ) : void
Résultat void

isCrop() public méthode

Test if is crop defined
public isCrop ( ) : boolean
Résultat boolean

setCoords() public méthode

Set coordinates for image
public setCoords ( string $coords ) : void
$coords string
Résultat void

setHeight() public méthode

Set height
public setHeight ( integer $height ) : void
$height integer
Résultat void

setLabel() public méthode

Set label
public setLabel ( string $label ) : void
$label string
Résultat void

setOffset() public méthode

Set offset
public setOffset ( integer $offset ) : void
$offset integer
Résultat void

setSpecs() public méthode

Set specification
public setSpecs ( string $specs ) : void
$specs string
Résultat void

setWidth() public méthode

Set width
public setWidth ( integer $width ) : void
$width integer
Résultat void

Property Details

$coords protected_oe property

protected string $coords
Résultat string

$height protected_oe property

protected int $height
Résultat integer

$label protected_oe property

protected string $label
Résultat string

$name protected_oe property

protected string $name
Résultat string

$offset protected_oe property

protected int $offset
Résultat integer

$specs protected_oe property

protected string $specs
Résultat string

$width protected_oe property

protected int $width
Résultat integer