承接 petlid/rssreader 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

petlid/rssreader

Composer 安装命令:

composer require petlid/rssreader

包简介

PHP class for getting an rss-feed

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage

Introduction

A small SimplePie wrapper-class designed for usage with the Anax/MVC framework, generates HTML for an RSS-feed.

By Petrus Lidholm | pelle@lidholm.se

Installation

Since rssreader is designed for Anax/MVC framework and is dependant on it, it is required that you get the framework before following the steps below. Anax/MVC is located at https://github.com/mosbth/Anax-MVC.git.

rssreader also uses SimplePie, include it in the composer.json located in the root :"require": { "simplepie/simplepie": "dev-master" }.

Download

You can either download this repo as a .zip-file or you can use composer to get the package through packagist by adding the following line in the composer.json located in the root:

"require": { "petlid/rssreader": "dev-master" }.

Setup

To use rssreader you'll have to set it up as a controller in Anax/MVC,

$di->set('RssController', function() use ($di) {
    $controller = new \petlid\RSSReader\RSSReaderController(:url);
    $controller->setDI($di);
    return $controller;
});

Important replace :url with the url (in quotation marks) of the RSS-feed you'd like to display.

To view the RSS-feed you can add a route to the viewAction in your front controller like this:

$app->router->add('rss', function() use ($app) {
    $app->dispatcher->forward([
        'controller' => 'RSS',
        'action'     => 'view',
        'params'     => [
            'noOfItems' => :noOfItems
        ],
    ]);
});

the name of the added route is irrelevant. To access the route simply go to your front controller, for example index.php, and add '/rss' to the url.

Notice :noOfItems is the number of rss-articles you want in your feed. It is optional (and defaults to 5).

Lastly, copy the contents of petlid\rssreader\view into Anax-MVC\app\view.

Optional

You can choose to get some basic styling of the RSS-feed by copying the catalog petlid\rssreader\css into Anax-MVC\webroot and adding the stylesheet in the front controller from which you call $app->theme->addStylesheet('css/rss.css');

统计信息

  • 总下载量: 26
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固