2013-08-11 13:30:41 +02:00
|
|
|
<?php
|
|
|
|
/* rss-bridge library.
|
|
|
|
Foundation functions for rss-bridge project.
|
|
|
|
See https://github.com/sebsauvage/rss-bridge
|
|
|
|
Licence: Public domain.
|
|
|
|
*/
|
|
|
|
|
2018-11-06 18:08:53 +01:00
|
|
|
define('PATH_VENDOR', __DIR__ . '/../vendor');
|
2013-08-11 13:30:41 +02:00
|
|
|
|
2018-11-06 18:15:08 +01:00
|
|
|
require_once __DIR__ . '/Exceptions.php';
|
|
|
|
require_once __DIR__ . '/Format.php';
|
|
|
|
require_once __DIR__ . '/FormatAbstract.php';
|
|
|
|
require_once __DIR__ . '/Bridge.php';
|
|
|
|
require_once __DIR__ . '/BridgeAbstract.php';
|
|
|
|
require_once __DIR__ . '/FeedExpander.php';
|
|
|
|
require_once __DIR__ . '/Cache.php';
|
|
|
|
require_once __DIR__ . '/Authentication.php';
|
|
|
|
require_once __DIR__ . '/Configuration.php';
|
|
|
|
require_once __DIR__ . '/BridgeCard.php';
|
|
|
|
require_once __DIR__ . '/BridgeList.php';
|
|
|
|
require_once __DIR__ . '/ParameterValidator.php';
|
|
|
|
|
|
|
|
require_once __DIR__ . '/html.php';
|
|
|
|
require_once __DIR__ . '/error.php';
|
|
|
|
require_once __DIR__ . '/contents.php';
|
2013-08-11 13:30:41 +02:00
|
|
|
|
2018-11-06 18:11:16 +01:00
|
|
|
require_once PATH_VENDOR . '/simplehtmldom/simple_html_dom.php';
|
|
|
|
require_once PATH_VENDOR . '/php-urljoin/src/urljoin.php';
|
2018-08-02 06:31:56 +02:00
|
|
|
|
2013-08-11 13:30:41 +02:00
|
|
|
/* Example use
|
2016-09-10 20:41:11 +02:00
|
|
|
|
|
|
|
require_once __DIR__ . '/lib/RssBridge.php';
|
|
|
|
|
|
|
|
// Data retrieval
|
|
|
|
Bridge::setDir(__DIR__ . '/bridges/');
|
|
|
|
$bridge = Bridge::create('GoogleSearch');
|
|
|
|
$bridge->collectData($_REQUEST);
|
|
|
|
|
|
|
|
// Data transformation
|
|
|
|
Format::setDir(__DIR__ . '/formats/');
|
|
|
|
$format = Format::create('Atom');
|
|
|
|
$format
|
|
|
|
->setItems($bridge->getItems())
|
|
|
|
->setExtraInfos(array(
|
|
|
|
'name' => $bridge->getName(),
|
|
|
|
'uri' => $bridge->getURI(),
|
2018-08-21 17:46:47 +02:00
|
|
|
'icon' => $bridge->getIcon(),
|
2016-09-10 20:41:11 +02:00
|
|
|
))
|
|
|
|
->display();
|
2013-08-11 13:30:41 +02:00
|
|
|
|
2015-11-05 11:12:58 +01:00
|
|
|
*/
|