PHP Класс Newscoop\Package\Item

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$image Newscoop\Image\LocalImage

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный метод

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

getCaption() публичный метод

Get caption.
public getCaption ( ) : string
Результат string

getId() публичный метод

Get id.
public getId ( ) : integer
Результат integer

getImage() публичный метод

Get image.
public getImage ( ) : LocalImage
Результат Newscoop\Image\LocalImage

getImageSpecs() публичный метод

Get image specs.
public getImageSpecs ( ) : string
Результат string

getItem() публичный метод

Get clone of itself - for serializer.
public getItem ( ) : self
Результат self

getOffset() публичный метод

Get offset.
public getOffset ( )

getPackage() публичный метод

Get package.
public getPackage ( ) : integer
Результат integer

getPackageId() публичный метод

Get package id.
public getPackageId ( ) : integer
Результат integer

getPackageItems() публичный метод

Get package items.
public getPackageItems ( ) : array
Результат array

getRendition() публичный метод

Get rendition.
public getRendition ( ) : Newscoop\Image\Rendition
Результат Newscoop\Image\Rendition

getType() публичный метод

Get Item type.
public getType ( ) : string
Результат string "video" or "image"

getVideoUrl() публичный метод

Get video url.
public getVideoUrl ( ) : string
Результат string

isImage() публичный метод

Test if item is image.
public isImage ( ) : boolean
Результат boolean

isVideo() публичный метод

Test if item is video.
public isVideo ( ) : boolean
Результат boolean

setCaption() публичный метод

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

setCoords() публичный метод

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

setOffset() публичный метод

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

setType() публичный метод

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

setVideoUrl() публичный метод

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

Описание свойств

$caption защищенное свойство

protected text $caption
Результат text

$coords защищенное свойство

protected string $coords
Результат string

$id защищенное свойство

protected int $id
Результат integer

$image публичное свойство

public LocalImage,Newscoop\Image $image
Результат Newscoop\Image\LocalImage

$offset защищенное свойство

protected int $offset
Результат integer

$package защищенное свойство

protected Newscoop\Package\Package $package
Результат Newscoop\Package\Package

$type защищенное свойство

Item type used by Newscoop API.
protected string $type
Результат string

$videoUrl защищенное свойство

protected string $videoUrl
Результат string