PHP Class Newscoop\Image\ArticleRenditionCollection

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

Protected Properties

Property Type Description
$articleNumber integer
$defaultImage Newscoop\Image\ImageInterface
$renditions array

Public Methods

Method 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

Method Description
setArticleRenditions ( array $renditions ) : void Set article renditions

Method Details

__construct() public method

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

offsetExists() public method

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
return boolean

offsetGet() public method

Get image for rendition
public offsetGet ( Newscoop\Image\Rendition $rendition ) : Newscoop\Image\ArticleImageRendition
$rendition Newscoop\Image\Rendition
return Newscoop\Image\ArticleImageRendition

offsetSet() public method

public offsetSet ( $offset, $value )

offsetUnset() public method

public offsetUnset ( $offset )

Property Details

$articleNumber protected_oe property

protected int $articleNumber
return integer

$defaultImage protected_oe property

protected Newscoop\Image\ImageInterface $defaultImage
return Newscoop\Image\ImageInterface

$renditions protected_oe property

protected array $renditions
return array