2011-12-14 12:18:36 +01:00
|
|
|
<?php
|
|
|
|
abstract class EmbedProvider {
|
|
|
|
public $url;
|
|
|
|
public $endpoint;
|
2011-12-16 11:44:55 +01:00
|
|
|
public $maxwidth;
|
|
|
|
public $maxheight;
|
2012-02-03 01:42:31 +01:00
|
|
|
public $config;
|
2011-12-14 12:18:36 +01:00
|
|
|
public abstract function match($url);
|
|
|
|
public abstract function provide($url,$format="json");
|
|
|
|
// public abstract function register();
|
2011-12-16 11:44:55 +01:00
|
|
|
public function __construct($url,$endpoint, $maxwidth=null, $maxheight=null){
|
2011-12-14 12:18:36 +01:00
|
|
|
$this->url = $url;
|
|
|
|
$this->endpoint = $endpoint;
|
2011-12-16 11:44:55 +01:00
|
|
|
$this->maxwidth = $maxwidth;
|
|
|
|
$this->maxheight = $maxheight;
|
2011-12-14 12:18:36 +01:00
|
|
|
}
|
2012-02-03 01:42:31 +01:00
|
|
|
public function set_config($config) {
|
|
|
|
$this->config = $config;
|
|
|
|
}
|
2011-12-14 12:18:36 +01:00
|
|
|
}
|