for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Tzsk\ScrapePod;
use Tzsk\ScrapePod\Contracts\VendorInterface;
use Tzsk\ScrapePod\Vendors\DigitalPodcast;
use Tzsk\ScrapePod\Vendors\Itunes;
class ScrapePodcast
{
/**
* @var VendorInterface
*/
protected $vendor;
* @var int
protected $count = 15;
* @var bool
protected $isOrginal = false;
* ScrapePodcast constructor.
public function __construct()
$this->vendor = new Itunes();
}
* @return ScrapePodcast
public function itunes()
return $this;
public function digitalPodcast()
$this->vendor = new DigitalPodcast();
* @param int $count
*
public function limit($count)
$this->count = $count;
* @param string $term
* @return array
public function search($term)
return $this->engine()->get($term);
* @param $id
public function find($id)
return $this->engine()->get((int) $id);
* @param string $feed
public function feed($feed)
return $this->engine()->find($feed);
public function original()
$this->isOrginal = true;
* @return PodcastScraper
protected function engine()
$engine = (new PodcastScraper($this->vendor))->limit($this->count);
return $this->isOrginal ? $engine->original() : $engine;