Skip to main content

RSS::fetchAll

Fetch all records or specified number records of RSS Feed

Description

public self RSS::fetchAll( [ number $max = 0 ] )

Arguments

NameData typeDefaultRemarks
$maxnumber0Maxmum record number / if 0 getting all the records

Example

Controller
$rss = $this->getClass('Tool/RSS', 'https://example.com/feed');
$posts = $rss->fetchAll(5);

foreach ($posts as $post) {
// Use $post
}