2012-06-26 14:28:18 +00:00
|
|
|
<?php defined('SYSPATH') or die('No direct access allowed.');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This class provides HOST Plugin Support
|
|
|
|
*
|
|
|
|
* @package OSB
|
|
|
|
* @subpackage Host Plugins
|
|
|
|
* @category Plugins
|
|
|
|
* @author Deon George
|
|
|
|
* @copyright (c) 2010 Deon George
|
|
|
|
* @license http://dev.leenooks.net/license.html
|
|
|
|
*/
|
|
|
|
abstract class Host_Plugin implements Serializable {
|
|
|
|
protected $hso; // Our Host Serve Object
|
|
|
|
protected $_object;
|
|
|
|
|
|
|
|
protected $curlopts = array(
|
|
|
|
CURLOPT_CONNECTTIMEOUT => 60,
|
|
|
|
CURLOPT_FAILONERROR => TRUE,
|
|
|
|
CURLOPT_FOLLOWLOCATION => FALSE,
|
|
|
|
CURLOPT_HEADER => FALSE,
|
|
|
|
CURLOPT_HTTPPROXYTUNNEL => FALSE,
|
|
|
|
CURLOPT_RETURNTRANSFER => TRUE,
|
|
|
|
CURLOPT_TIMEOUT => 30,
|
|
|
|
CURLOPT_SSL_VERIFYHOST => FALSE,
|
|
|
|
CURLOPT_SSL_VERIFYPEER => FALSE,
|
|
|
|
CURLOPT_VERBOSE => FALSE,
|
|
|
|
);
|
|
|
|
|
|
|
|
// Required abstract classes
|
2012-07-12 05:10:53 +00:00
|
|
|
abstract public function __get($key);
|
2012-06-26 14:28:18 +00:00
|
|
|
abstract public function admin_update();
|
|
|
|
|
|
|
|
abstract public function manage_button(Model_Service_Plugin_Host $spho,$t);
|
|
|
|
abstract public function admin_manage_button(Model_Host_Server $hso,$t);
|
|
|
|
abstract protected function render_button($t,$sid,$u,$p);
|
|
|
|
|
|
|
|
public function __construct(Model_Host_Server $hso) {
|
|
|
|
$this->hso = $hso;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function value($key,$value=NULL) {
|
|
|
|
// If value is NULL, we are a getter
|
|
|
|
if (is_null($value))
|
|
|
|
return isset($this->hso->provision_plugin_data[$key]) ? $this->hso->provision_plugin_data[$key] : NULL;
|
|
|
|
else
|
|
|
|
$this->hso->provision_plugin_data[$key] = $value;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
?>
|