diff --git a/bridges/MangareaderBridge.php b/bridges/MangareaderBridge.php
index 23a8dea..551c2ab 100644
--- a/bridges/MangareaderBridge.php
+++ b/bridges/MangareaderBridge.php
@@ -1,94 +1,94 @@
array(),
'Get popular mangas' => array(
- 'category'=>array(
- 'name'=>'Category',
- 'type'=>'list',
- 'required'=>true,
- 'values'=>array(
- 'All'=>'all',
- 'Action'=>'action',
- 'Adventure'=>'adventure',
- 'Comedy'=>'comedy',
- 'Demons'=>'demons',
- 'Drama'=>'drama',
- 'Ecchi'=>'ecchi',
- 'Fantasy'=>'fantasy',
- 'Gender Bender'=>'gender-bender',
- 'Harem'=>'harem',
- 'Historical'=>'historical',
- 'Horror'=>'horror',
- 'Josei'=>'josei',
- 'Magic'=>'magic',
- 'Martial Arts'=>'martial-arts',
- 'Mature'=>'mature',
- 'Mecha'=>'mecha',
- 'Military'=>'military',
- 'Mystery'=>'mystery',
- 'One Shot'=>'one-shot',
- 'Psychological'=>'psychological',
- 'Romance'=>'romance',
- 'School Life'=>'school-life',
- 'Sci-Fi'=>'sci-fi',
- 'Seinen'=>'seinen',
- 'Shoujo'=>'shoujo',
- 'Shoujoai'=>'shoujoai',
- 'Shounen'=>'shounen',
- 'Shounenai'=>'shounenai',
- 'Slice of Life'=>'slice-of-life',
- 'Smut'=>'smut',
- 'Sports'=>'sports',
- 'Super Power'=>'super-power',
- 'Supernatural'=>'supernatural',
- 'Tragedy'=>'tragedy',
- 'Vampire'=>'vampire',
- 'Yaoi'=>'yaoi',
- 'Yuri'=>'yuri'
+ 'category' => array(
+ 'name' => 'Category',
+ 'type' => 'list',
+ 'required' => true,
+ 'values' => array(
+ 'All' => 'all',
+ 'Action' => 'action',
+ 'Adventure' => 'adventure',
+ 'Comedy' => 'comedy',
+ 'Demons' => 'demons',
+ 'Drama' => 'drama',
+ 'Ecchi' => 'ecchi',
+ 'Fantasy' => 'fantasy',
+ 'Gender Bender' => 'gender-bender',
+ 'Harem' => 'harem',
+ 'Historical' => 'historical',
+ 'Horror' => 'horror',
+ 'Josei' => 'josei',
+ 'Magic' => 'magic',
+ 'Martial Arts' => 'martial-arts',
+ 'Mature' => 'mature',
+ 'Mecha' => 'mecha',
+ 'Military' => 'military',
+ 'Mystery' => 'mystery',
+ 'One Shot' => 'one-shot',
+ 'Psychological' => 'psychological',
+ 'Romance' => 'romance',
+ 'School Life' => 'school-life',
+ 'Sci-Fi' => 'sci-fi',
+ 'Seinen' => 'seinen',
+ 'Shoujo' => 'shoujo',
+ 'Shoujoai' => 'shoujoai',
+ 'Shounen' => 'shounen',
+ 'Shounenai' => 'shounenai',
+ 'Slice of Life' => 'slice-of-life',
+ 'Smut' => 'smut',
+ 'Sports' => 'sports',
+ 'Super Power' => 'super-power',
+ 'Supernatural' => 'supernatural',
+ 'Tragedy' => 'tragedy',
+ 'Vampire' => 'vampire',
+ 'Yaoi' => 'yaoi',
+ 'Yuri' => 'yuri'
),
- 'exampleValue'=>'All',
- 'title'=>'Select your category'
+ 'exampleValue' => 'All',
+ 'title' => 'Select your category'
)
),
'Get manga updates' => array(
- 'path'=>array(
- 'name'=>'Path',
- 'required'=>true,
- 'pattern'=>'[a-zA-Z0-9-_]*',
- 'exampleValue'=>'bleach, umi-no-kishidan',
- 'title'=>'URL part of desired manga'
+ 'path' => array(
+ 'name' => 'Path',
+ 'required' => true,
+ 'pattern' => '[a-zA-Z0-9-_]*',
+ 'exampleValue' => 'bleach, umi-no-kishidan',
+ 'title' => 'URL part of desired manga'
),
- 'limit'=>array(
- 'name'=>'Limit',
- 'type'=>'number',
- 'defaultValue'=>10,
- 'title'=>'Number of items to return [-1 returns all]'
+ 'limit' => array(
+ 'name' => 'Limit',
+ 'type' => 'number',
+ 'defaultValue' => 10,
+ 'title' => 'Number of items to return [-1 returns all]'
)
)
);
- private $request='';
+ private $request = '';
- public function collectData(){
- // We'll use the DOM parser for this as it makes navigation easier
- $html = $this->getContents($this->getURI());
+ public function collectData(){
+ // We'll use the DOM parser for this as it makes navigation easier
+ $html = $this->getContents($this->getURI());
if(!$html){
$this->returnClientError('Could not receive data for ' . $path . '!');
}
libxml_use_internal_errors(true);
$doc = new DomDocument;
- @$doc->loadHTML($html);
+ @$doc->loadHTML($html);
libxml_clear_errors();
- // Navigate via XPath
- $xpath = new DomXPath($doc);
+ // Navigate via XPath
+ $xpath = new DomXPath($doc);
$this->request = '';
switch($this->queriedContext){
@@ -107,7 +107,7 @@ class MangareaderBridge extends BridgeAbstract{
if (isset($manga) && $chapters->length >= 1){
$item = array();
- $item['uri'] = self::URI. htmlspecialchars($manga->getAttribute('href'));
+ $item['uri'] = self::URI . htmlspecialchars($manga->getAttribute('href'));
$item['title'] = htmlspecialchars($manga->nodeValue);
// Add each chapter to the feed
@@ -117,7 +117,7 @@ class MangareaderBridge extends BridgeAbstract{
if($item['content'] <> ""){
$item['content'] .= "
";
}
- $item['content'] .= "" . htmlspecialchars($chapter->nodeValue) . "";
+ $item['content'] .= "" . htmlspecialchars($chapter->nodeValue) . "";
}
$this->items[] = $item;
@@ -176,14 +176,14 @@ class MangareaderBridge extends BridgeAbstract{
break;
}
- // Return some dummy-data if no content available
- if(empty($this->items)){
- $item = array();
- $item['content'] = "
No updates available
"; + // Return some dummy-data if no content available + if(empty($this->items)){ + $item = array(); + $item['content'] = "No updates available
"; - $this->items[] = $item; - } - } + $this->items[] = $item; + } + } public function getURI(){ switch($this->queriedContext){ @@ -204,12 +204,12 @@ class MangareaderBridge extends BridgeAbstract{ } - public function getName(){ - return (!empty($this->request) ? $this->request . ' - ' : '') . 'Mangareader Bridge'; - } + public function getName(){ + return (!empty($this->request) ? $this->request . ' - ' : '') . 'Mangareader Bridge'; + } - public function getCacheDuration(){ - return 10800; // 3 hours - } + public function getCacheDuration(){ + return 10800; // 3 hours + } } ?>