Frontend\Core\Engine\Rss::__construct PHP Method

__construct() public method

The default constructor
public __construct ( string $title, string $link, string $description, array $items = [] )
$title string The title off the feed.
$link string The link of the feed.
$description string The description of the feed.
$items array An array with SpoonRSSItems.
    public function __construct($title, $link, $description, array $items = array())
    {
        // decode
        $title = \SpoonFilter::htmlspecialcharsDecode($title);
        $description = \SpoonFilter::htmlspecialcharsDecode($description);
        // call the parent
        parent::__construct($title, Model::addURLParameters($link, array('utm_source' => 'feed', 'utm_medium' => 'rss', 'utm_campaign' => CommonUri::getUrl($title))), $description, $items);
        $siteTitle = \SpoonFilter::htmlspecialcharsDecode(Model::get('fork.settings')->get('Core', 'site_title_' . LANGUAGE));
        // set feed properties
        $this->setLanguage(LANGUAGE);
        $this->setCopyright(\SpoonDate::getDate('Y') . ' ' . $siteTitle);
        $this->setGenerator($siteTitle);
        $this->setImage(SITE_URL . FRONTEND_CORE_URL . '/Layout/images/rss_image.png', $title, $link);
        // theme was set
        if (Model::get('fork.settings')->get('Core', 'theme', null) != null) {
            // theme name
            $theme = Model::get('fork.settings')->get('Core', 'theme', null);
            // theme rss image exists
            if (is_file(PATH_WWW . '/src/Frontend/Themes/' . $theme . '/Core/images/rss_image.png')) {
                // set rss image
                $this->setImage(SITE_URL . '/src/Frontend/Themes/' . $theme . '/Core/images/rss_image.png', $title, $link);
            }
        }
    }