PHP Class Newscoop\Package\Item

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

Méthodes publiques

Свойство Type Description
$image Newscoop\Image\LocalImage

Protected Properties

Свойство Type Description
$caption text
$coords string
$id integer
$link string Item link used by Newscoop API.
$offset integer
$package Newscoop\Package\Package
$type string Item type used by Newscoop API.
$videoUrl string

Méthodes publiques

Méthode Description
__construct ( Package $package, mixed $item )
getCaption ( ) : string Get caption.
getId ( ) : integer Get id.
getImage ( ) : LocalImage Get image.
getImageSpecs ( ) : string Get image specs.
getItem ( ) : self Get clone of itself - for serializer.
getLink ( ) : string Get link for Item resource.
getOffset ( ) Get offset.
getPackage ( ) : integer Get package.
getPackageId ( ) : integer Get package id.
getPackageItems ( ) : array Get package items.
getRendition ( ) : Newscoop\Image\Rendition Get rendition.
getType ( ) : string Get Item type.
getVideoUrl ( ) : string Get video url.
isImage ( ) : boolean Test if item is image.
isVideo ( ) : boolean Test if item is video.
setCaption ( string $caption ) Set caption.
setCoords ( string $coords ) Set crop coordinates.
setLink ( string $link ) Set link for Item resource.
setOffset ( integer $offset ) Set offset.
setType ( string $type ) Set Item type.
setVideoUrl ( string $url ) Set video url.

Method Details

__construct() public méthode

public __construct ( Package $package, mixed $item )
$package Package
$item mixed

getCaption() public méthode

Get caption.
public getCaption ( ) : string
Résultat string

getId() public méthode

Get id.
public getId ( ) : integer
Résultat integer

getImage() public méthode

Get image.
public getImage ( ) : LocalImage
Résultat Newscoop\Image\LocalImage

getImageSpecs() public méthode

Get image specs.
public getImageSpecs ( ) : string
Résultat string

getItem() public méthode

Get clone of itself - for serializer.
public getItem ( ) : self
Résultat self

getOffset() public méthode

Get offset.
public getOffset ( )

getPackage() public méthode

Get package.
public getPackage ( ) : integer
Résultat integer

getPackageId() public méthode

Get package id.
public getPackageId ( ) : integer
Résultat integer

getPackageItems() public méthode

Get package items.
public getPackageItems ( ) : array
Résultat array

getRendition() public méthode

Get rendition.
public getRendition ( ) : Newscoop\Image\Rendition
Résultat Newscoop\Image\Rendition

getType() public méthode

Get Item type.
public getType ( ) : string
Résultat string "video" or "image"

getVideoUrl() public méthode

Get video url.
public getVideoUrl ( ) : string
Résultat string

isImage() public méthode

Test if item is image.
public isImage ( ) : boolean
Résultat boolean

isVideo() public méthode

Test if item is video.
public isVideo ( ) : boolean
Résultat boolean

setCaption() public méthode

Set caption.
public setCaption ( string $caption )
$caption string

setCoords() public méthode

Set crop coordinates.
public setCoords ( string $coords )
$coords string

setOffset() public méthode

Set offset.
public setOffset ( integer $offset )
$offset integer

setType() public méthode

Set Item type.
public setType ( string $type )
$type string "video" or "image"

setVideoUrl() public méthode

Set video url.
public setVideoUrl ( string $url )
$url string

Property Details

$caption protected_oe property

protected text $caption
Résultat text

$coords protected_oe property

protected string $coords
Résultat string

$id protected_oe property

protected int $id
Résultat integer

$image public_oe property

public LocalImage,Newscoop\Image $image
Résultat Newscoop\Image\LocalImage

$offset protected_oe property

protected int $offset
Résultat integer

$package protected_oe property

protected Newscoop\Package\Package $package
Résultat Newscoop\Package\Package

$type protected_oe property

Item type used by Newscoop API.
protected string $type
Résultat string

$videoUrl protected_oe property

protected string $videoUrl
Résultat string