summaryrefslogtreecommitdiffstats
path: root/vendor/fguillot/picofeed/lib
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-11-07 12:32:05 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2014-11-07 12:32:05 +0100
commit7f81afd7efbeb931d16ce1f3a1ed53a54226d553 (patch)
tree180720cd96aa66ae8964f13734e090d4b82a178e /vendor/fguillot/picofeed/lib
parenta6d6288e65aa416aca7535e81d9e8837c2cfb103 (diff)
move 3rdparty directory to vendor to be more consistent with composer standard and because we also use js/vendor for third party libs
Diffstat (limited to 'vendor/fguillot/picofeed/lib')
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/Client.php540
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/ClientException.php16
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/Curl.php324
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/Favicon.php170
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/Grabber.php403
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/InvalidCertificateException.php13
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/InvalidUrlException.php13
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/MaxRedirectException.php13
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/MaxSizeException.php13
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/Stream.php170
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/TimeoutException.php13
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/Url.php254
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Config/Config.php90
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Encoding/Encoding.php171
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Filter/Attribute.php589
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Filter/Filter.php170
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Filter/Html.php196
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Filter/Tag.php173
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Logging/Logging.php95
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Atom.php281
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Feed.php188
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Item.php202
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/MalformedXmlException.php13
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Parser.php610
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/ParserException.php16
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss10.php77
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php291
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss91.php13
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss92.php13
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/XmlParser.php232
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/PicoFeedException.php15
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php232
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Reader/ReaderException.php16
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Reader/SubscriptionNotFoundException.php13
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Reader/UnsupportedFeedFormatException.php13
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/.blog.lemonde.fr.php10
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/.blogs.nytimes.com.php11
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/.igen.fr.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/.nytimes.com.php8
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/.phoronix.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/.slate.com.php16
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/.theguardian.com.php10
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wikipedia.org.php25
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wired.com.php19
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wsj.com.php11
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/blog.fefe.de.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/consomac.fr.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/distrowatch.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/dozodomo.com.php11
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcodesign.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcoexist.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcompany.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/ffworld.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/github.com.php10
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/golem.de.php8
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/heise.de.php7
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/huffingtonpost.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/ing.dk.php8
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/journaldugeek.com.php10
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/kanpai.fr.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/karriere.jobfinder.dk.php8
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/lejapon.fr.php14
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/lesjoiesducode.fr.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/lifehacker.com.php14
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/lists.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/macg.co.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/medium.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/monwindowsphone.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/pastebin.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/plus.google.com.php7
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/rue89.feedsportal.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/smallhousebliss.com.php17
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/spiegel.de.php7
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/techcrunch.com.php13
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/treehugger.com.php10
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/version2.dk.php8
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bbc.co.uk.php22
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bdgest.com.php11
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.businessweek.com.php11
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.cnn.com.php22
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.egscomics.com.php8
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.forbes.com.php16
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.futura-sciences.com.php15
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.lemonde.fr.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.lepoint.fr.php16
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.mac4ever.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.nextinpact.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.npr.org.php15
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.numerama.com.php10
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.pcinpact.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.pseudo-sciences.org.php12
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.slate.fr.php17
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.universfreebox.com.php11
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Serialization/Export.php132
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Serialization/Import.php172
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Atom.php220
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Rss20.php207
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Writer.php97
98 files changed, 7125 insertions, 0 deletions
diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Client/Client.php b/vendor/fguillot/picofeed/lib/PicoFeed/Client/Client.php
new file mode 100644
index 000000000..7328b2c75
--- /dev/null
+++ b/vendor/fguillot/picofeed/lib/PicoFeed/Client/Client.php
@@ -0,0 +1,540 @@
+<?php
+
+namespace PicoFeed\Client;
+
+use LogicException;
+use PicoFeed\Logging\Logging;
+
+/**
+ * Client class
+ *
+ * @author Frederic Guillot
+ * @package client
+ */
+abstract class Client
+{
+ /**
+ * Flag that say if the resource have been modified
+ *
+ * @access private
+ * @var bool
+ */
+ private $is_modified = true;
+
+ /**
+ * HTTP encoding
+ *
+ * @access private
+ * @var string
+ */
+ private $encoding = '';
+
+ /**
+ * HTTP Etag header
+ *
+ * @access protected
+ * @var string
+ */
+ protected $etag = '';
+
+ /**
+ * HTTP Last-Modified header
+ *
+ * @access protected
+ * @var string
+ */
+ protected $last_modified = '';
+
+ /**
+ * Proxy hostname
+ *
+ * @access protected
+ * @var string
+ */
+ protected $proxy_hostname = '';
+
+ /**
+ * Proxy port
+ *
+ * @access protected
+ * @var integer
+ */
+ protected $proxy_port = 3128;
+
+ /**
+ * Proxy username
+ *
+ * @access protected
+ * @var string
+ */
+ protected $proxy_username = '';
+
+ /**
+ * Proxy password
+ *
+ * @access protected
+ * @var string
+ */
+ protected $proxy_password = '';
+
+ /**
+ * Client connection timeout
+ *
+ * @access protected
+ * @var integer
+ */
+ protected $timeout = 10;
+
+ /**
+ * User-agent
+ *
+ * @access protected
+ * @var string
+ */
+ protected $user_agent = 'PicoFeed (https://github.com/fguillot/picoFeed)';
+
+ /**
+ * Real URL used (can be changed after a HTTP redirect)
+ *
+ * @access protected
+ * @var string
+ */
+ protected $url = '';
+
+ /**
+ * Page/Feed content
+ *
+ * @access protected
+ * @var string
+ */
+ protected $content = '';
+
+ /**
+ * Number maximum of HTTP redirections to avoid infinite loops
+ *
+ * @access protected
+ * @var integer
+ */
+ protected $max_redirects = 5;
+
+ /**
+ * Maximum size of the HTTP body response
+ *
+ * @access protected
+ * @var integer
+ */
+ protected $max_body_size = 2097152; // 2MB
+
+ /**
+ * Do the HTTP request
+ *
+ * @abstract
+ * @access public
+ * @return array
+ */
+ abstract public function doRequest();
+
+ /**
+ * Get client instance: curl or stream driver
+ *
+ * @static
+ * @access public
+ * @return \PicoFeed\Client\Client