Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (20 sloc) 714 Bytes
<?php
class PennyArcadeService extends GenericComicService {
const FEED_URI = 'http://penny-arcade.com/feed';
const PATTERN = '/<div.+img src="(.+?)"/';
const ENTRY_SEARCH_TEXT = "Comic: ";
public function __construct(FeedService $feedService, Logger $logger, StorageService $store) {
parent::__construct("pennyarcade", $feedService, $logger, $store);
}
private function getConfig() {
$config = array();
$config[] = new FeedFetchOptions('default', self::FEED_URI, self::ENTRY_SEARCH_TEXT, self::PATTERN);
return $config;
}
public function fetchAllAndStore() {
$config = $this->getConfig();
foreach ($config as $currentConfig) {
$this->fetchAndStore($currentConfig);
}
}
}