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/checkout/classes/Checkout/Plugin.php

38 lines
909 B
PHP
Raw Permalink Normal View History

2013-10-10 02:44:53 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides CHECKOUT Plugin Support
*
* @package Checkout
* @category Plugins
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
2013-11-28 06:41:34 +00:00
*
2013-10-10 02:44:53 +00:00
* @todo Does this need to be Serializable?
*/
abstract class Checkout_Plugin implements Serializable {
protected $co; // Our Checkout Object
protected $_object;
2013-11-28 06:41:34 +00:00
// Our required abstract classes
2013-10-10 02:44:53 +00:00
public function serialize() {
return (string)$this->_object;
}
public function unserialize($s) {
$this->_object = XML::factory(NULL,NULL,$s);
}
// Required abstract classes
2013-11-28 06:41:34 +00:00
2013-10-10 02:44:53 +00:00
// Present pre-plugin processing information
abstract public function before(Cart $co);
abstract public function notify(Model_Checkout_Notify $cno);
public function __construct(Model_Checkout $co) {
$this->co = $co;
}
}
?>