{"id":19571793,"url":"https://github.com/loadsys/cakephp-rss-datasource","last_synced_at":"2025-04-27T03:32:41.625Z","repository":{"id":1058784,"uuid":"892003","full_name":"loadsys/CakePHP-RSS-Datasource","owner":"loadsys","description":"Helps reading RSS feeds in CakePHP as if it were a model.","archived":false,"fork":false,"pushed_at":"2014-02-06T23:24:04.000Z","size":173,"stargazers_count":17,"open_issues_count":2,"forks_count":5,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-04T20:51:24.227Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://blog.loadsys.com/2009/06/19/cakephp-rss-feed-datasource/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loadsys.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-09-06T19:25:19.000Z","updated_at":"2024-11-26T00:56:16.000Z","dependencies_parsed_at":"2022-08-16T11:55:20.799Z","dependency_job_id":null,"html_url":"https://github.com/loadsys/CakePHP-RSS-Datasource","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-RSS-Datasource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-RSS-Datasource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-RSS-Datasource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-RSS-Datasource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loadsys","download_url":"https://codeload.github.com/loadsys/CakePHP-RSS-Datasource/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251085145,"owners_count":21533821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T06:20:04.215Z","updated_at":"2025-04-27T03:32:41.288Z","avatar_url":"https://github.com/loadsys.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Installation\n\n\tcd your_app_name/Plugin/\n\tgit clone git@github.com:loadsys/CakePHP-RSS-Datasource.git Rss\n\nYou may optionally want to add it as a submodule instead of the clone command above.\n\n\tgit submodule add git@github.com:loadsys/CakePHP-RSS-Datasource.git Rss\n\nAlso, add the following line to your bootstrap.php.\n\n\tCakePlugin::load('Rss');\n\n## Usage\n\nThe values shown below under the Optional comment will be set to the values you see there if they are left out. The required options must exist. If you wish, you can make different database config property for each different feed you would like to work with. The feedUrl is an optional parameter that will be used by default if it is not set in the model.\n\n\t\u003c?php\n\t//  app/config/database.php\n\tclass DATABASE_CONFIG {\n\t\tpublic $feedSource = array(\n\n\t\t\t/** Required **/\n\t\t\t'datasource' =\u003e 'Rss.Rss',\n\t\t\t'database' =\u003e false,\n\n\t\t\t/** Optional **/\n\t\t\t'feedUrl' =\u003e 'http://feedurl',\n\t\t\t'encoding' =\u003e 'UTF-8',\n\t\t\t'cacheTime' =\u003e '+1 day',\n\t\t);\n\t}\n\t?\u003e\n\nInside of each model that will consume an RSS feed, change the $useDbConfig property to the appropriate feed property from the database.php file. If you are instead using a single database config property, you would set the feed url in the model. The public $feedUrl is read before a read, and takes priority over the feedUrl set in the database config property.\n\n\t\u003c?php\n\t//  app/models/feed.php\n\tclass Feed extends AppModel {\n\t\tpublic $name = 'Feed';\n\t\tpublic $useDbConfig = 'feedSource';\n\t\t/** Optional **/\n\t\tpublic $feedUrl = 'http://feedUrl';\n\t}\n\t?\u003e\n\nThen in your controller that uses the model, simply use the $this-\u003eModel-\u003efind('all');\n\n\t\u003c?php\n\t//  app/controllers/feeds_controller.php\n\tclass FeedsController extends AppController {\n\t\tpublic $uses = array('Feed');\n\t\tpublic function index() {\n\t\t\t$feeds = $this-\u003eFeed-\u003efind('all');\n\t\t\t$this-\u003eset(compact('feeds'));\n\t\t}\n\t}\n\t?\u003e\n\n## Reference\n\nOriginal blog post: http://blog.loadsys.com/2009/06/19/cakephp-rss-feed-datasource/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floadsys%2Fcakephp-rss-datasource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floadsys%2Fcakephp-rss-datasource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floadsys%2Fcakephp-rss-datasource/lists"}