feed
in package
Base feed class from which all others descend.
Plugins will set the feedtype property to the feed desired
- gallery
- news
- pages
- comments
Feed details are determined by the option property. Elements of this array and their meaning follow:
- lang
- locale
- sortdir
- desc (default) for descending order
- asc for ascending order
- sortorder
- latest (default) for the latest uploaded by id (discovery order)
- latest-date for the latest fetched by date
- latest-mtime for the latest fetched by mtime
- latest-publishdate for the latest fetched by publishdate
- popular for the most popular albums
- topratedv for the best voted
- mostrated for the most voted
- random for random order
- id internal id order
- albumname
- albumsmode
- folder
- size
- category
- itemnumber
- type (for comments feed)
- albums
- images
- pages
- news
Table of Contents
Properties
- $albumfolder : mixed
- $albumpath : mixed
- $catlink : mixed
- $cattitle : mixed
- $channel_title : mixed
- $collection : mixed
- $commentfeedtype : mixed
- $feed : mixed
- $feeditem : mixed
- $feedtype : mixed
- $id : mixed
- $imagepath : mixed
- $imagesize : mixed
- $itemnumber : mixed
- $itemobj : mixed
- $locale : mixed
- $locale_xml : mixed
- $mode : mixed
- $modrewritesuffix : mixed
- $newsoption : mixed
- $options : mixed
- $sortdirection : mixed
- $sortorder : mixed
- $titleappendix : mixed
Methods
- __construct() : mixed
- clearCache() : mixed
- Cleans out the cache folder
- getitems() : array<string|int, mixed>
- Gets the feed items
- endCache() : mixed
- Ends the static caching.
- feed404() : mixed
- getAlbum() : int
- Validates and gets the "folder" or 'albumname" parameter option value
- getCacheFilename() : string
- Creates a file name from the options array
- getCategory() : int
- Validates and gets the "category" parameter option value
- getChannelTitleExtra() : mixed
- getCommentFeedType() : string
- Validates and gets the "type" parameter option value for comment feeds
- getID() : int
- Validates and gets the "id" parameter option value for comments feeds of a specific item
- getImageSize() : string
- Helper function that gets the images size of the "size" get parameter
- getitemComments() : array<string|int, mixed>
- Gets the feed item data in a comments feed
- getitemPages() : array<string|int, mixed>
- Gets the feed item data in a Zenpage news feed
- getLang() : string
- Validates and gets the "lang" parameter option value
- getSortdir() : bool
- Validates and gets the "sortdir" parameter option value
- getSortorder() : string
- Validates and gets the "sortorder" parameter option value
- startCache() : mixed
- Starts static caching
- unsetOptions() : mixed
- Unsets certain option name indices from the $options property.
Properties
$albumfolder
protected
mixed
$albumfolder
= \NULL
$albumpath
protected
mixed
$albumpath
= \NULL
$catlink
protected
mixed
$catlink
= \NULL
$cattitle
protected
mixed
$cattitle
= \NULL
$channel_title
protected
mixed
$channel_title
= \NULL
$collection
protected
mixed
$collection
= \NULL
$commentfeedtype
protected
mixed
$commentfeedtype
= \NULL
$feed
protected
mixed
$feed
= 'feed'
$feeditem
protected
mixed
$feeditem
= array()
$feedtype
protected
mixed
$feedtype
= \NULL
$id
protected
mixed
$id
= \NULL
$imagepath
protected
mixed
$imagepath
= \NULL
$imagesize
protected
mixed
$imagesize
= \NULL
$itemnumber
protected
mixed
$itemnumber
= \NULL
$itemobj
protected
mixed
$itemobj
= \NULL
$locale
protected
mixed
$locale
= \NULL
$locale_xml
protected
mixed
$locale_xml
= \NULL
$mode
protected
mixed
$mode
$modrewritesuffix
protected
mixed
$modrewritesuffix
= \NULL
$newsoption
protected
mixed
$newsoption
= \NULL
$options
protected
mixed
$options
$sortdirection
protected
mixed
$sortdirection
= \NULL
$sortorder
protected
mixed
$sortorder
= \NULL
$titleappendix
protected
mixed
$titleappendix
= \NULL
Methods
__construct()
public
__construct(mixed $options) : mixed
Parameters
- $options : mixed
clearCache()
Cleans out the cache folder
public
clearCache([string $cachefolder = NULL ]) : mixed
Parameters
- $cachefolder : string = NULL
-
the sub-folder to clean
getitems()
Gets the feed items
public
getitems() : array<string|int, mixed>
Return values
array<string|int, mixed>endCache()
Ends the static caching.
protected
endCache() : mixed
feed404()
protected
static feed404() : mixed
getAlbum()
Validates and gets the "folder" or 'albumname" parameter option value
protected
getAlbum(string $option) : int
Parameters
- $option : string
-
"folder" or "albumname"
Return values
intgetCacheFilename()
Creates a file name from the options array
protected
getCacheFilename() : string
Return values
stringgetCategory()
Validates and gets the "category" parameter option value
protected
getCategory() : int
Return values
intgetChannelTitleExtra()
protected
getChannelTitleExtra() : mixed
getCommentFeedType()
Validates and gets the "type" parameter option value for comment feeds
protected
getCommentFeedType() : string
Return values
stringgetID()
Validates and gets the "id" parameter option value for comments feeds of a specific item
protected
getID() : int
Return values
intgetImageSize()
Helper function that gets the images size of the "size" get parameter
protected
getImageSize() : string
Return values
stringgetitemComments()
Gets the feed item data in a comments feed
protected
getitemComments(array<string|int, mixed> $item) : array<string|int, mixed>
Parameters
- $item : array<string|int, mixed>
-
Array of a comment
Return values
array<string|int, mixed>getitemPages()
Gets the feed item data in a Zenpage news feed
protected
getitemPages(array<string|int, mixed> $item, mixed $len) : array<string|int, mixed>
Parameters
- $item : array<string|int, mixed>
-
Titlelink a Zenpage article or filename of an image if a combined feed
- $len : mixed
Return values
array<string|int, mixed>getLang()
Validates and gets the "lang" parameter option value
protected
getLang() : string
Tags
Return values
stringgetSortdir()
Validates and gets the "sortdir" parameter option value
protected
getSortdir() : bool
Return values
boolgetSortorder()
Validates and gets the "sortorder" parameter option value
protected
getSortorder() : string
Return values
stringstartCache()
Starts static caching
protected
startCache() : mixed
unsetOptions()
Unsets certain option name indices from the $options property.
protected
unsetOptions([array<string|int, mixed> $options = null ]) : mixed
Parameters
- $options : array<string|int, mixed> = null
-
Array of option (parameter) names to be unset