Commit graph

20 commits

Author SHA1 Message Date
Pierre Mazière f1fb95b257 [core] extract BridgeAbstract methods to make them functions
- returnError, returnServerError, returnClientError ,debugMessage are
  moved to lib/error.php

- getContents, getSimpleHTMLDOM, getSimpleHTMLDOMCached are moved to
  lib/contents.php

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-25 23:22:33 +02:00
Pierre Mazière 3bacb407fe [bridges] use parent::parseItems() instead of feed type specific method
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-12 10:42:27 +02:00
logmanoriginal 2eec89ab27 [bridges] Change all bridges to use BridgeAbstract with getSimpleHTMLDOMCached 2016-09-10 19:11:09 +02:00
logmanoriginal 2861a855e4 [bridges] Define max items and clear caches 2016-09-05 20:26:45 +02:00
logmanoriginal 179e73fb80 [bridges] Change to extend from FeedExpander 2016-09-05 20:10:19 +02:00
Pierre Mazière 9a0da733ef [bridges] use constants instead of variable members
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-01 23:15:51 +02:00
Pierre Mazière 3fb8c5b916 [NextgovBridge] code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-29 13:57:02 +02:00
Pierre Mazière 1b3c8a8aeb [core + bridges] add BridgeAbstract::$inputs and BridgeAbstract::getInput()
Inputs are not stored in BridgeAbstract::$parameters anymore to separate
static data from dynamic data.
The getInput method allows for more readable code.

Also fix an "undefined index 'global'" notice

Probability of breaking bridges: high !

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-28 13:05:03 +02:00
Pierre Mazière de1b39c8e5 [core + bridges] get rid of loadMetadata
if a bridge needs to modify some of the data that were initialized
there, ::__construct() should be used instead.

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-28 13:05:03 +02:00
Pierre Mazière 117031bf0f [core] store parameters values in BridgeAbstract::parameters
This way, any BridgeAbstract method can now have access to these values,
no only collectData

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-25 01:24:53 +02:00
logmanoriginal bf0a9d754e [bridges] Change all occurrences of the Item object to array 2016-08-22 18:55:59 +02:00
Pierre Mazière f0e502ce37 [bridges] migrate all bridges to an array based definition of parameters
see github issue 356

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-22 01:25:56 +02:00
Pierre Mazière bba216073c [bridges] remove useless 'update' property from all bridges
That's the source code manager job to keep this information
consistent

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-21 00:21:41 +02:00
Pierre Mazière 6e2c7ceaf4 bridges: rename file_get_html to getSimpleHTMLDOM
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:20:27 +02:00
logmanoriginal 74f0572d91 bridges: Replace returnError function with more specific
Replacements depend on original error code:
400: returnClientError
404: returnServerError
500: returnServerError
501: returnServerError
2016-08-17 14:45:08 +02:00
logmanoriginal 42b6c82753 bridges: Cleanup occurrences of $item->thumbnailUri
This is a subsequent change to f3eefab
2016-08-09 15:50:55 +02:00
logmanoriginal 0ddf664d89 bridges: Remove obsolete getName() and getURI() 2016-08-06 18:45:02 +02:00
logmanoriginal 5432cabef5 bridges: Put name/uri directly in bridge metadata
Some bridges used getName() and getURI() to put information into the
metadatas. Instead the metadatas should be initialized with data and
(not yet done) returned by default via getName() and getURI().
2016-08-06 18:07:42 +02:00
logmanoriginal 5ad157d2fd bridges: Remove getCacheDuration if default
BridgeAbstract will return 3600 seconds by default, so the function
can be removed from any bridge implementing getCacheDuration
returning the same value.

Documentation updated accordingly.
2016-08-06 16:23:09 +02:00
ORelio dfc4e8aaac [Nextgov] New bridge. USA tech news. 2016-07-26 21:20:13 +02:00