PHP Class Newscoop\Image\ArticleRenditionCollection

Set of image renditions for article returning default image if not overriden
Inheritance: implements ArrayAccess
Afficher le fichier Open project: sourcefabric/newscoop

Protected Properties

Свойство Type Description
$articleNumber integer
$defaultImage Newscoop\Image\ImageInterface
$renditions array

Méthodes publiques

Méthode Description
__construct ( integer $articleNumber, array $articleRenditions = [], Newscoop\Image\ImageInterface $defaultImage = null )
offsetExists ( Newscoop\Image\Rendition $rendition, boolean $strict = false ) : boolean Test if can provide image for rendition
offsetGet ( Newscoop\Image\Rendition $rendition ) : Newscoop\Image\ArticleImageRendition Get image for rendition
offsetSet ( $offset, $value )
offsetUnset ( $offset )

Private Methods

Méthode Description
setArticleRenditions ( array $renditions ) : void Set article renditions

Method Details

__construct() public méthode

public __construct ( integer $articleNumber, array $articleRenditions = [], Newscoop\Image\ImageInterface $defaultImage = null )
$articleNumber integer
$articleRenditions array
$defaultImage Newscoop\Image\ImageInterface

offsetExists() public méthode

Test if can provide image for rendition
public offsetExists ( Newscoop\Image\Rendition $rendition, boolean $strict = false ) : boolean
$rendition Newscoop\Image\Rendition
$strict boolean Check only key existing
Résultat boolean

offsetGet() public méthode

Get image for rendition
public offsetGet ( Newscoop\Image\Rendition $rendition ) : Newscoop\Image\ArticleImageRendition
$rendition Newscoop\Image\Rendition
Résultat Newscoop\Image\ArticleImageRendition

offsetSet() public méthode

public offsetSet ( $offset, $value )

offsetUnset() public méthode

public offsetUnset ( $offset )

Property Details

$articleNumber protected_oe property

protected int $articleNumber
Résultat integer

$defaultImage protected_oe property

protected Newscoop\Image\ImageInterface $defaultImage
Résultat Newscoop\Image\ImageInterface

$renditions protected_oe property

protected array $renditions
Résultat array