Suin\RSSWriter\Channel::description PHP Method

description() public method

Set channel description
public description ( string $description )
$description string
    public function description($description)
    {
        $this->description = $description;
        return $this;
    }

Usage Example

         * $photoType = $fInfo->file($photoInternalPath);
         * unset($fInfo);
         **/
        $photoType = 'image/jpeg';
        $blogPostItem->enclosure("https://blog.jacobemerick.com{$photoPath}", $photoSize, $photoType);
    }
    $blogPostItem->appendTo($blogPostChannel);
}
$buildFeed($blogPostFeed, 'blog');
/*********************************************
 * Then the blog comments
 *********************************************/
$blogCommentFeed = new Feed();
$blogCommentChannel = new Channel();
$blogCommentChannel->title('Jacob Emerick | Blog Comment Feed');
$blogCommentChannel->description('Most recent comments on blog posts of Jacob Emerick');
$blogCommentChannel->url('https://blog.jacobemerick.com');
// todo depends on env
$blogCommentChannel->appendTo($blogCommentFeed);
$query = "\n    SELECT `comment_meta`.`id`, `comment_meta`.`date`, `comment`.`body`, `commenter`.`name`,\n           `post`.`title`, `post`.`category`, `post`.`path`\n    FROM `jpemeric_comment`.`comment_meta`\n    INNER JOIN `jpemeric_comment`.`comment` ON `comment`.`id` = `comment_meta`.`comment`\n    INNER JOIN `jpemeric_comment`.`commenter` ON `commenter`.`id` = `comment_meta`.`commenter` AND\n                                                 `commenter`.`trusted` = :trusted_commenter\n    INNER JOIN `jpemeric_comment`.`comment_page` ON `comment_page`.`id` = `comment_meta`.`comment_page` AND\n                                                    `comment_page`.`site` = :comment_site\n    INNER JOIN `jpemeric_blog`.`post` ON `post`.`path` = `comment_page`.`path` AND\n                                         `post`.`display` = :display_post\n    WHERE `comment_meta`.`display` = :active_comment\n    ORDER BY `comment_meta`.`date` DESC";
$bindings = ['trusted_commenter' => 1, 'comment_site' => 2, 'display_post' => 1, 'active_comment' => 1];
$activeBlogComments = $db->getRead()->fetchAll($query, $bindings);
foreach ($activeBlogComments as $blogComment) {
    $blogCommentItem = new Item();
    $blogCommentItem->title("Comment on '{$blogComment['title']}' from {$blogComment['name']}");
    $url = "https://blog.jacobemerick.com/{$blogComment['category']}/{$blogComment['path']}/";
    $url .= "#comment-{$blogComment['id']}";
    $blogCommentItem->url($url);
    $blogCommentItem->guid($url, true);
    $description = $blogComment['body'];
    $description = strip_tags($description);
All Usage Examples Of Suin\RSSWriter\Channel::description