<?php defined('SYSPATH') or die('No direct access allowed.');

/**
 * This class supports OSB Web Hosting
 *
 * @package    OSB
 * @subpackage Product
 * @category   Models
 * @author     Deon George
 * @copyright  (c) 2010 Open Source Billing
 * @license    http://dev.osbill.net/license.html
 */
class Model_Host_Server extends ORMOSB {
	// Host Server doesnt use the update column
	protected $_updated_column = FALSE;

	public function manage_button($u,$p,$d) {
		$c = sprintf('Service_Host_%s',$this->provision_plugin);
		if (! class_exists($c))
			return '';

		$po = new $c($this->id);

		return $po->manage_button($u,$p,$d);
	}

	public function prov_plugin_data() {
		if (! $this->provision_plugin_data)
			throw new Kohana_Exception('No plugin configuration data');

		return unserialize($this->provision_plugin_data);
	}
}
?>
