PHP Class Newscoop\Package\Item

Mostrar archivo Open project: sourcefabric/newscoop Class Usage Examples

Public Properties

Property Type Description
$image Newscoop\Image\LocalImage

Protected Properties

Property 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

Public Methods

Method 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 method

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

getCaption() public method

Get caption.
public getCaption ( ) : string
return string

getId() public method

Get id.
public getId ( ) : integer
return integer

getImage() public method

Get image.
public getImage ( ) : LocalImage
return Newscoop\Image\LocalImage

getImageSpecs() public method

Get image specs.
public getImageSpecs ( ) : string
return string

getItem() public method

Get clone of itself - for serializer.
public getItem ( ) : self
return self

getOffset() public method

Get offset.
public getOffset ( )

getPackage() public method

Get package.
public getPackage ( ) : integer
return integer

getPackageId() public method

Get package id.
public getPackageId ( ) : integer
return integer

getPackageItems() public method

Get package items.
public getPackageItems ( ) : array
return array

getRendition() public method

Get rendition.
public getRendition ( ) : Newscoop\Image\Rendition
return Newscoop\Image\Rendition

getType() public method

Get Item type.
public getType ( ) : string
return string "video" or "image"

getVideoUrl() public method

Get video url.
public getVideoUrl ( ) : string
return string

isImage() public method

Test if item is image.
public isImage ( ) : boolean
return boolean

isVideo() public method

Test if item is video.
public isVideo ( ) : boolean
return boolean

setCaption() public method

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

setCoords() public method

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

setOffset() public method

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

setType() public method

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

setVideoUrl() public method

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

Property Details

$caption protected_oe property

protected text $caption
return text

$coords protected_oe property

protected string $coords
return string

$id protected_oe property

protected int $id
return integer

$image public_oe property

public LocalImage,Newscoop\Image $image
return Newscoop\Image\LocalImage

$offset protected_oe property

protected int $offset
return integer

$package protected_oe property

protected Newscoop\Package\Package $package
return Newscoop\Package\Package

$type protected_oe property

Item type used by Newscoop API.
protected string $type
return string

$videoUrl protected_oe property

protected string $videoUrl
return string