forked from blallo/rss-bridge
[Mangareader] Fix coding styles
This commit is contained in:
parent
4c96aab832
commit
6c51eaa4d7
1 changed files with 83 additions and 83 deletions
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
class MangareaderBridge extends BridgeAbstract{
|
||||
class MangareaderBridge extends BridgeAbstract {
|
||||
|
||||
const MAINTAINER = "logmanoriginal";
|
||||
const NAME = "Mangareader Bridge";
|
||||
|
@ -9,72 +9,72 @@ class MangareaderBridge extends BridgeAbstract{
|
|||
const PARAMETERS = array(
|
||||
'Get latest updates' => 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
|
||||
|
@ -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'] .= "<br>";
|
||||
}
|
||||
$item['content'] .= "<a href='" .self::URI. htmlspecialchars($chapter->getAttribute('href')) . "'>" . htmlspecialchars($chapter->nodeValue) . "</a>";
|
||||
$item['content'] .= "<a href='" . self::URI . htmlspecialchars($chapter->getAttribute('href')) . "'>" . htmlspecialchars($chapter->nodeValue) . "</a>";
|
||||
}
|
||||
|
||||
$this->items[] = $item;
|
||||
|
|
Loading…
Reference in a new issue