public function __construct($url, $endpoint, $onlyJson = false, $maxwidth = null, $maxheight = null, $dimensionsSupported = true) { parent::__construct($url, $endpoint, $maxwidth, $maxheight); $this->onlyJson = $onlyJson; $this->dimensionsSupported = $dimensionsSupported; $this->urlRegExp = preg_replace(array("/\\*/", "/\\//", "/\\.\\*\\./"), array(".*", "\\/", ".*"), $url); $this->urlRegExp = "/" . $this->urlRegExp . "/"; if (preg_match("/\\{format\\}/", $endpoint)) { $this->jsonEndpoint = preg_replace("/\\{format\\}/", "json", $endpoint); $this->jsonEndpoint .= "?url={url}"; $this->xmlEndpoint = preg_replace("/\\{format\\}/", "xml", $endpoint); $this->xmlEndpoint .= "?url={url}"; } else { if (strpos($endpoint, '?') === FALSE) { $this->jsonEndpoint = $endpoint . "?url={url}&format=json"; $this->xmlEndpoint = $endpoint . "?url={url}&format=xml"; } else { $this->jsonEndpoint = $endpoint . "&url={url}&format=json"; $this->xmlEndpoint = $endpoint . "&url={url}&format=xml"; } } if ($this->dimensionsSupported) { if (!empty($this->maxwidth)) { $this->jsonEndpoint .= '&maxwidth=' . $this->maxwidth; $this->xmlEndpoint .= '&maxwidth=' . $this->maxwidth; } if (!empty($this->maxheight)) { $this->jsonEndpoint .= '&maxwidth=' . $this->maxheight; $this->xmlEndpoint .= '&maxwidth=' . $this->maxheight; } } }
public function __construct($url, $endpoint) { parent::__construct($url, $endpoint); $this->urlRegExp = preg_replace(array("/\\*/", "/\\//", "/\\.\\*\\./"), array(".*", "\\/", ".*"), $url); $this->urlRegExp = "/" . $this->urlRegExp . "/"; if (preg_match("/\\{format\\}/", $endpoint)) { $this->jsonEndpoint = preg_replace("/\\{format\\}/", "json", $endpoint); $this->jsonEndpoint .= "?url={url}"; $this->xmlEndpoint = preg_replace("/\\{format\\}/", "xml", $endpoint); $this->xmlEndpoint .= "?url={url}"; } else { $this->jsonEndpoint = $endpoint . "?url={url}&format=json"; $this->xmlEndpoint = $endpoint . "?url={url}&format=xml"; } }
/** * Constructor * Enter description here ... * @param simplexml $config holds the entry in the providers.xml for this Provider. You can add more parameters parsed here */ public function __construct($config) { parent::__construct("http://minicasts.podomatic.com/play", ""); }
/** * Constructor * Enter description here ... * @param simplexml $config holds the entry in the providers.xml for this Provider. You can add more parameters parsed here */ public function __construct($config) { parent::__construct("http://post.ly", ""); }
/** * Constructor * Enter description here ... * @param simplexml $config holds the entry in the providers.xml for this Provider. You can add more parameters parsed here */ public function __construct($config) { parent::__construct("http://boo.fm/boo", ""); }
public function __construct($config) { parent::__construct("http://youtube.com", ""); }