VuFind API Documentation

Feed extends Feed
in package

Laminas\Feed\Feed extension for Open Search

Note: There doesn't seem to be a generic base class for this functionality, and creating a class with no parent blows up due to unexpected calls to Itunes-related functionality. To work around this, we are extending the equivalent Itunes plugin. This works fine, but perhaps in future there will be a more elegant way to achieve the same effect.

Tags
category

VuFind

author

Sebastian Cuy sebastian.cuy@uni-koeln.de

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

$encoding  : string
Encoding of all text values
$itemsPerPage  : int
Items per page
$links  : array<string|int, mixed>
Links
$searchTerms  : string
Search terms
$startIndex  : int
Start index
$stringWrapper  : StringWrapperInterface
The used string wrapper supporting encoding
$totalResults  : int
Total results
__construct()  : mixed
Constructor
addOpensearchLink()  : Feed
Add a link
getEncoding()  : string
Get feed encoding
getOpensearchItemsPerPage()  : int
Get items per page
getOpensearchLinks()  : string
Get the links
getOpensearchSearchTerms()  : string
Get search terms
getOpensearchStartIndex()  : int
Get start index
getOpensearchTotalResults()  : int
Get total results
setEncoding()  : Feed
Set feed encoding
setOpensearchItemsPerPage()  : Feed
Set items per page
setOpensearchSearchTerms()  : Feed
Set search terms
setOpensearchStartIndex()  : Feed
Set start index
setOpensearchTotalResults()  : Feed
Set total results

Properties

$encoding

Encoding of all text values

protected string $encoding = 'UTF-8'

$itemsPerPage

Items per page

protected int $itemsPerPage = null

Links

protected array<string|int, mixed> $links = []

$searchTerms

Search terms

protected string $searchTerms = null

$startIndex

Start index

protected int $startIndex = null

$stringWrapper

The used string wrapper supporting encoding

protected StringWrapperInterface $stringWrapper

$totalResults

Total results

protected int $totalResults = null

Methods

__construct()

Constructor

public __construct() : mixed
Return values
mixed

Add a link

public addOpensearchLink(string $url[, string $role = null ][, string $type = null ][, string $title = null ]) : Feed
Parameters
$url : string

the url of the link

$role : string = null

the role of the link

$type : string = null

the mime type of the link

$title : string = null

Title for the link (optional)

Return values
Feed

getEncoding()

Get feed encoding

public getEncoding() : string
Return values
string

getOpensearchItemsPerPage()

Get items per page

public getOpensearchItemsPerPage() : int
Return values
int

Get the links

public getOpensearchLinks() : string
Return values
string

getOpensearchSearchTerms()

Get search terms

public getOpensearchSearchTerms() : string
Return values
string

getOpensearchStartIndex()

Get start index

public getOpensearchStartIndex() : int
Return values
int

getOpensearchTotalResults()

Get total results

public getOpensearchTotalResults() : int
Return values
int

setEncoding()

Set feed encoding

public setEncoding(string $enc) : Feed
Parameters
$enc : string

encoding to set

Return values
Feed

setOpensearchItemsPerPage()

Set items per page

public setOpensearchItemsPerPage(int $itemsPerPage) : Feed
Parameters
$itemsPerPage : int

number to set

Return values
Feed

setOpensearchSearchTerms()

Set search terms

public setOpensearchSearchTerms(string $searchTerms) : Feed
Parameters
$searchTerms : string

search terms

Return values
Feed

setOpensearchStartIndex()

Set start index

public setOpensearchStartIndex(int $startIndex) : Feed
Parameters
$startIndex : int

index to set

Return values
Feed

setOpensearchTotalResults()

Set total results

public setOpensearchTotalResults(int $totalResults) : Feed
Parameters
$totalResults : int

number to set

Return values
Feed

Search results