3c27a3e7 | <?php /** * Created by IntelliJ IDEA. * User: nosko * Date: 1/26/13 * Time: 10:52 PM * To change this template use File | Settings | File Templates. */ /** * Class representing restaurant */ |
e421c421 | abstract class Restaurant { |
3c27a3e7 | |
e421c421 | protected $url; protected $name; protected $xpaths = array(); function __construct($name, $url, $xpaths) { if (empty($url) || empty($xpaths)) { throw new InvalidArgumentException("All argument are required"); } $this->name = $name; $this->url = $url; if (is_string($xpaths)) { $this->xpaths[] = $xpaths; } else if (is_array($xpaths)) { $this->xpaths = $xpaths; } else { throw new InvalidArgumentException("Xpaths must be string or array"); } } |
3c27a3e7 | public function getName() { return $this->name; } public function getUrl() { return $this->url; } public function getXpaths() { return $this->xpaths; } |
e421c421 | public function runCallbackParser($parentNode, iOutput $logger) { return FALSE; } |
3c27a3e7 | } |