diff options
Diffstat (limited to 'utility/simplepieapifactory.php')
-rw-r--r-- | utility/simplepieapifactory.php | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/utility/simplepieapifactory.php b/utility/simplepieapifactory.php index 2184cd994..d1fd26111 100644 --- a/utility/simplepieapifactory.php +++ b/utility/simplepieapifactory.php @@ -17,12 +17,22 @@ namespace OCA\News\Utility; class SimplePieAPIFactory { - /** - * Builds a simplepie file object. This is needed because - * the file object contains logic in its constructor which makes it - * impossible to inject and test - * @return SimplePie_File a new object - */ + /** + * Builds a simplepie file object. This is needed because + * the file object contains logic in its constructor which makes it + * impossible to inject and test + * + * @param $url + * @param int $timeout + * @param int $redirects + * @param null $headers + * @param null $useragent + * @param bool $force_fsockopen + * @param null $proxyHost + * @param null $proxyPort + * @param null $proxyAuth + * @return SimplePie_File a new object + */ public function getFile($url, $timeout=10, $redirects=5, $headers=null, $useragent=null, $force_fsockopen=false, $proxyHost=null, $proxyPort=null, $proxyAuth=null) { @@ -36,12 +46,12 @@ class SimplePieAPIFactory { /** * Returns a new instance of a SimplePie_Core() object. This is needed * because the class relies on external dependencies which are not passed - * in via the constructor and thus making it nearly impossible to unittest + * in via the constructor and thus making it nearly impossible to unit test * code that uses this class * @return \SimplePie_Core instance */ public function getCore() { - return new \SimplePie_Core(); + return new \SimplePie(); } |