This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/modules/host/classes/Host/Plugin.php
2012-12-21 13:01:12 +11:00

52 lines
1.4 KiB
PHP

<?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
abstract public function __get($key);
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;
}
}
?>