diff --git a/.gitignore b/.gitignore index ee0f099..8cdf6d1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,7 @@ test/web/webconfig.php # Potential error logs error_log error.log +.idea +.DS_Store + +vendor diff --git a/affirm_api.php b/affirm_api.php deleted file mode 100644 index 3fd9805..0000000 --- a/affirm_api.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @copyright Copyright (c) 2015 - * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @version 0.9.0 - */ - -// Make sure this directory is application root -$AFFIRM_ROOT = __DIR__; - -// Load the settings -require_once ($AFFIRM_ROOT . '/config.php'); - -// Load the classes -$PATH = $AFFIRM_ROOT . '/classes'; -$includes = scandir($PATH); -foreach ($includes as $include){ - if (is_file($PATH . '/' . $include) && $include != '.' && $include != '..' && fnmatch("*.php", $include)){ - require_once ($PATH . '/' . $include); - } -} diff --git a/classes/api.php b/classes/api.php deleted file mode 100644 index f1a2b55..0000000 --- a/classes/api.php +++ /dev/null @@ -1,318 +0,0 @@ - - * @copyright Copyright (c) 2015 - * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @version Release: @package_version@ - * - */ -class AffirmAPI { - public $private_key; /**< Affirm Private Key */ - public $public_key; /**< Affirm Public Key */ - public $product_key; /**< Affirm Financial Product Key */ - public $base_url; /**< Affirm base url for making request */ - public $curl; /**< AffirmCurl object */ - - public $response; /**< Data from Affirm as an object */ - public $status; /**< HTTP Status from Affirm */ - - /** - * Constructor, uses default configuration file if left empty - * - * @param boolean $production Set this to false for sandbox mode - * @param string $public_key Public Key for Affirm API - * @param string $private_key Private Key for Affirm API - * @param string $product_key Finanical product keyfor Affirm - */ - public function __construct($production = null, $public_key = null, $private_key = null, $product_key = null){ - // Set up configuration, use override for production mode if needed - if (!class_exists('AffirmConfig')){ - throw new Exception('AffirmConfig class does not exist'); - } - $config = new AffirmConfig(); - if (is_bool($production)){ - $config->production = $production; - } - if ($config->production == true){ - $this->public_key = $config->live_public_key; - $this->private_key = $config->live_private_key; - $this->base_url = $config->live_baseurl; - } - else{ - $this->public_key = $config->sandbox_public_key; - $this->private_key = $config->sandbox_private_key; - $this->base_url = $config->sandbox_baseurl; - } - $this->product_key = $config->product_key; - - // Add any overrides to keys and codes - if (is_string($public_key) && $public_key != ''){ - $this->public_key = $public_key; - } - if (is_string($private_key) && $private_key != ''){ - $this->private_key = $private_key; - } - if (is_string($product_key) && $product_key != ''){ - $this->product_key = $product_key; - } - } - - /** - * Creates a new charge from the checkout_token - * - * @param string $checkout_token Authentication token from affirm.js - * - * @return int $status Status as an integer, 0 meaning success - */ - public function create_charge($checkout_token){ - if (is_null($checkout_token) || $checkout_token == ''){ - // Make something look like the Affirm error object - $this->response = (object) array( - 'status_code' => 1, - 'type' => 'invalid_request', - 'code' => 'invalid_field', - 'message' => 'Checkout Token is empty, could not send to Affirm', - 'field' => 'checkout_token', - ); - return 1; - } - else{ - $auth_array = array('checkout_token' => $checkout_token); - $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}", 'POST', $auth_array); - $this->curl->send(); - $this->curl->unpack(); - $this->response = $this->curl->response_object; - $this->status = $this->curl->status; - if ($this->curl->status == 200){ - // Zero is always a good number to return when there is no error - return 0; - } - else{ - // Just pass the status code from Affirm through the API - return $this->curl->status; - } - } - } - - /** - * Reads a charge from a previously created charge - * - * @param string $charge_id Unique Charge ID from Affirm - * - * @return int $status Status as an integer, 0 meaning success - */ - public function read_charge($charge_id){ - if ($charge_id == ''){ - // Make something look like the Affirm error object - $this->response = (object) array( - 'status_code' => 1, - 'type' => 'invalid_request', - 'code' => 'invalid_field', - 'message' => 'Charge ID is empty, could not send to Affirm', - 'field' => 'charge_id', - ); - return 1; - } - else{ - $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}/{$charge_id}"); - $this->curl->send(); - $this->curl->unpack(); - $this->response = $this->curl->response_object; - $this->status = $this->curl->status; - if ($this->curl->status == 200){ - // Zero is always a good number to return when there is no error - return 0; - } - else{ - // Just pass the status code from Affirm through the API - return $this->curl->status; - } - } - } - - /** - * Captures the charge - * - * @param string $charge_id Unique Charge ID from Affirm - * @param string $order_id Optional order ID for your records - * @param string $carrier Optional shipping carrier name - * @param string $confirmation Optional confirmation number - * - * @return int $status Status as an integer, 0 meaning success - */ - public function capture_charge($charge_id, $order_id = null, $carrier = null, $confirmation = null){ - if ($charge_id == ''){ - // Make something look like the Affirm error object - $this->response = (object) array( - 'status_code' => 1, - 'type' => 'invalid_request', - 'code' => 'invalid_field', - 'message' => 'Charge ID is empty, could not send to Affirm', - 'field' => 'charge_id', - ); - return 1; - } - else{ - $inputs = array(); - if (!is_null($order_id)){ - $inputs['order_id'] = "{$order_id}"; - } - if (!is_null($carrier)){ - $inputs['shipping_carrier'] = "{$carrier}"; - } - if (!is_null($order_id)){ - $inputs['shipping_confirmation'] = "{$confirmation}"; - } - if(count($inputs) == 0){ - $inputs = '{}'; - } - $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}/{$charge_id}/capture", 'POST', $inputs); - $this->curl->send(); - $this->curl->unpack(); - $this->response = $this->curl->response_object; - $this->status = $this->curl->status; - if ($this->curl->status == 200){ - // Zero is always a good number to return when there is no error - return 0; - } - else{ - // Just pass the status code from Affirm through the API - return $this->curl->status; - } - } - } - - /** - * Voids the charge - * - * @param string $charge_id Unique Charge ID from Affirm - * - * @return int $status Status as an integer, 0 meaning success - */ - public function void_charge($charge_id){ - if ($charge_id == ''){ - // Make something look like the Affirm error object - $this->response = (object) array( - 'status_code' => 1, - 'type' => 'invalid_request', - 'code' => 'invalid_field', - 'message' => 'Charge ID is empty, could not send to Affirm', - 'field' => 'charge_id', - ); - return 1; - } - else{ - $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}/{$charge_id}/void", 'POST', '{}'); - $this->curl->send(); - $this->curl->unpack(); - $this->response = $this->curl->response_object; - $this->status = $this->curl->status; - if ($this->curl->status == 200){ - // Zero is always a good number to return when there is no error - return 0; - } - else{ - // Just pass the status code from Affirm through the API - return $this->curl->status; - } - } - } - - /** - * Refunds the charge - * - * @param string $charge_id Unique Charge ID from Affirm - * @param int $amount Amount of refund in cents - * - * @return int $status Status as an integer, 0 meaning success - */ - public function refund_charge($charge_id, $amount=null){ - if ($charge_id == ''){ - // Make something look like the Affirm error object - $this->response = (object) array( - 'status_code' => 1, - 'type' => 'invalid_request', - 'code' => 'invalid_field', - 'message' => 'Charge ID is empty, could not send to Affirm', - 'field' => 'charge_id', - ); - return 1; - } - else{ - $inputs = array('amount' => $amount); - $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}/{$charge_id}/refund", 'POST', $inputs); - $this->curl->send(); - $this->curl->unpack(); - $this->response = $this->curl->response_object; - $this->status = $this->curl->status; - if ($this->curl->status == 200){ - // Zero is always a good number to return when there is no error - return 0; - } - else{ - // Just pass the status code from Affirm through the API - return $this->curl->status; - } - } - } - - /** - * Updates the shipping information - * - * @param string $charge_id Unique Charge ID from Affirm - * @param string $order_id Optional order ID for your records - * @param string $carrier Optional shipping carrier name - * @param string $confirmation Optional confirmation number - * - * @return int $status Status as an integer, 0 meaning success - */ - public function update_shipping($charge_id, $order_id = null, $carrier = null, $confirmation = null){ - if ($charge_id == ''){ - // Make something look like the Affirm error object - $this->response = (object) array( - 'status_code' => 1, - 'type' => 'invalid_request', - 'code' => 'invalid_field', - 'message' => 'Charge ID is empty, could not send to Affirm', - 'field' => 'charge_id', - ); - return 1; - } - else{ - $inputs = array(); - if (!is_null($order_id)){ - $inputs['order_id'] = "{$order_id}"; - } - if (!is_null($carrier)){ - $inputs['shipping_carrier'] = "{$carrier}"; - } - if (!is_null($order_id)){ - $inputs['shipping_confirmation'] = "{$confirmation}"; - } - if(count($inputs) == 0){ - $inputs = '{}'; - } - $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}/{$charge_id}/update", 'POST', $inputs); - $this->curl->send(); - $this->curl->unpack(); - $this->response = $this->curl->response_object; - $this->status = $this->curl->status; - if ($this->curl->status == 200){ - // Zero is always a good number to return when there is no error - return 0; - } - else{ - // Just pass the status code from Affirm through the API - return $this->curl->status; - } - } - } -} diff --git a/classes/curl.php b/classes/curl.php deleted file mode 100644 index 9d388d2..0000000 --- a/classes/curl.php +++ /dev/null @@ -1,91 +0,0 @@ - - * @copyright Copyright (c) 2015 - * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @version Release: @package_version@ - * - */ -class AffirmCurl { - public $url; /**< URL to send the request */ - public $post_body; /**< Post body to send to Affirm */ - public $method; /**< HTTP Method to send */ - public $curl; /**< cURL handle keeping track of this */ - public $status; /**< stores the HTTP status from cURL response */ - public $headers; /**< stores the headers from the cURL response */ - public $response; /**< stores the raw response body */ - public $response_object; /**< response in object form, if available */ - public $options; /**< stores the cURL options */ - - /** - * Constructor - * - * @param string $url URL to request - * @param string $method HTTP Method - * @param array|string $data Data to pack and send to Affirm - */ - public function __construct($url, $method='GET', $data=''){ - if(is_null($data)){ - $this->post_body = ''; - } - elseif(is_array($data)){ - $this->post_body = json_encode($data, JSON_UNESCAPED_SLASHES); - } - else{ - $this->post_body = $data; - } - if(is_null($url)){ - throw new Exception('Missing the URL!'); - } - $this->status = 0; - $this->method = $method; - $this->url = $url; - $this-> options = array( - CURLOPT_POST => true, - CURLOPT_URL => $this->url, - CURLOPT_POSTFIELDS => $this->post_body, - CURLOPT_HTTPHEADER => array("Content-Type: application/json"), - CURLOPT_SSL_VERIFYPEER => false, - CURLOPT_CUSTOMREQUEST => $this->method, - ); - $this->curl = curl_init(); - } - - /** - * Sends the request to the remote server - */ - public function send(){ - ob_start(); - curl_setopt_array($this->curl, $this->options); - $success = curl_exec($this->curl); - if ($success){ - $this->headers = curl_getinfo($this->curl); - $this->status = $this->headers['http_code']; - $this->response = ob_get_clean(); - curl_close($this->curl); - } - else{ - throw new Exception('Unable to send cURL request'); - } - } - - /** - * - */ - public function unpack(){ - if ($this->headers['content_type'] == 'application/json' && $this->status > 0){ - $this->response_object = json_decode($this->response); - } - else{ - $this->response_object = null; - } - } -} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..951f5cc --- /dev/null +++ b/composer.json @@ -0,0 +1,20 @@ +{ + "name": "nurelm/affirm-php", + "description": "A stand-alone PHP library that connects to the Affirm API.", + "license": "GPL", + "authors": [ + { + "name": "Michael Sypolt", + "email": "michael.sypolt@nurelm.com" + } + ], + "require": {}, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "autoload": { + "psr-4": { + "NuRelm\\Affirm\\": "src/" + } + } +} diff --git a/src/AffirmAPI.php b/src/AffirmAPI.php new file mode 100644 index 0000000..1350039 --- /dev/null +++ b/src/AffirmAPI.php @@ -0,0 +1,309 @@ + + * @copyright Copyright (c) 2015 + * @license http://www.gnu.org/licenses/gpl-3.0.txt + * @version Release: @package_version@ + * + */ +class AffirmAPI +{ + public $private_key; + /**< Affirm Private Key */ + public $public_key; + /**< Affirm Public Key */ + public $product_key; + /**< Affirm Financial Product Key */ + public $base_url; + /**< Affirm base url for making request */ + public $curl; + /**< AffirmCurl object */ + + public $response; + /**< Data from Affirm as an object */ + public $status; + /**< HTTP Status from Affirm */ + + /** + * Constructor + * + * @param boolean $production Set this to false for sandbox mode + * @param string $public_key Public Key for Affirm API + * @param string $private_key Private Key for Affirm API + * @param string $product_key Finanical product keyfor Affirm + */ + public function __construct($production = false, $public_key, $private_key, $product_key) + { + $config = new AffirmConfig(); + + if ($production == true) { + $this->base_url = $config->live_baseurl; + } else { + $this->base_url = $config->sandbox_baseurl; + } + + $this->public_key = $public_key; + $this->private_key = $private_key; + $this->product_key = $product_key; + } + + /** + * Creates a new charge from the checkout_token + * + * @param string $checkout_token Authentication token from affirm.js + * + * @return int $status Status as an integer, 0 meaning success + */ + public function create_charge($checkout_token) + { + if (is_null($checkout_token) || $checkout_token == '') { + // Make something look like the Affirm error object + $this->response = (object)array( + 'status_code' => 1, + 'type' => 'invalid_request', + 'code' => 'invalid_field', + 'message' => 'Checkout Token is empty, could not send to Affirm', + 'field' => 'checkout_token', + ); + return 1; + } else { + $auth_array = array('checkout_token' => $checkout_token); + $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}", 'POST', + $auth_array); + $this->curl->send(); + $this->curl->unpack(); + $this->response = $this->curl->response_object; + $this->status = $this->curl->status; + if ($this->curl->status == 200) { + // Zero is always a good number to return when there is no error + return 0; + } else { + // Just pass the status code from Affirm through the API + return $this->curl->status; + } + } + } + + /** + * Reads a charge from a previously created charge + * + * @param string $charge_id Unique Charge ID from Affirm + * + * @return int $status Status as an integer, 0 meaning success + */ + public function read_charge($charge_id) + { + if ($charge_id == '') { + // Make something look like the Affirm error object + $this->response = (object)array( + 'status_code' => 1, + 'type' => 'invalid_request', + 'code' => 'invalid_field', + 'message' => 'Charge ID is empty, could not send to Affirm', + 'field' => 'charge_id', + ); + return 1; + } else { + $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}/{$charge_id}"); + $this->curl->send(); + $this->curl->unpack(); + $this->response = $this->curl->response_object; + $this->status = $this->curl->status; + if ($this->curl->status == 200) { + // Zero is always a good number to return when there is no error + return 0; + } else { + // Just pass the status code from Affirm through the API + return $this->curl->status; + } + } + } + + /** + * Captures the charge + * + * @param string $charge_id Unique Charge ID from Affirm + * @param string $order_id Optional order ID for your records + * @param string $carrier Optional shipping carrier name + * @param string $confirmation Optional confirmation number + * + * @return int $status Status as an integer, 0 meaning success + */ + public function capture_charge($charge_id, $order_id = null, $carrier = null, $confirmation = null) + { + if ($charge_id == '') { + // Make something look like the Affirm error object + $this->response = (object)array( + 'status_code' => 1, + 'type' => 'invalid_request', + 'code' => 'invalid_field', + 'message' => 'Charge ID is empty, could not send to Affirm', + 'field' => 'charge_id', + ); + return 1; + } else { + $inputs = array(); + if (!is_null($order_id)) { + $inputs['order_id'] = "{$order_id}"; + } + if (!is_null($carrier)) { + $inputs['shipping_carrier'] = "{$carrier}"; + } + if (!is_null($order_id)) { + $inputs['shipping_confirmation'] = "{$confirmation}"; + } + if (count($inputs) == 0) { + $inputs = '{}'; + } + $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}/{$charge_id}/capture", + 'POST', $inputs); + $this->curl->send(); + $this->curl->unpack(); + $this->response = $this->curl->response_object; + $this->status = $this->curl->status; + if ($this->curl->status == 200) { + // Zero is always a good number to return when there is no error + return 0; + } else { + // Just pass the status code from Affirm through the API + return $this->curl->status; + } + } + } + + /** + * Voids the charge + * + * @param string $charge_id Unique Charge ID from Affirm + * + * @return int $status Status as an integer, 0 meaning success + */ + public function void_charge($charge_id) + { + if ($charge_id == '') { + // Make something look like the Affirm error object + $this->response = (object)array( + 'status_code' => 1, + 'type' => 'invalid_request', + 'code' => 'invalid_field', + 'message' => 'Charge ID is empty, could not send to Affirm', + 'field' => 'charge_id', + ); + return 1; + } else { + $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}/{$charge_id}/void", + 'POST', '{}'); + $this->curl->send(); + $this->curl->unpack(); + $this->response = $this->curl->response_object; + $this->status = $this->curl->status; + if ($this->curl->status == 200) { + // Zero is always a good number to return when there is no error + return 0; + } else { + // Just pass the status code from Affirm through the API + return $this->curl->status; + } + } + } + + /** + * Refunds the charge + * + * @param string $charge_id Unique Charge ID from Affirm + * @param int $amount Amount of refund in cents + * + * @return int $status Status as an integer, 0 meaning success + */ + public function refund_charge($charge_id, $amount = null) + { + if ($charge_id == '') { + // Make something look like the Affirm error object + $this->response = (object)array( + 'status_code' => 1, + 'type' => 'invalid_request', + 'code' => 'invalid_field', + 'message' => 'Charge ID is empty, could not send to Affirm', + 'field' => 'charge_id', + ); + return 1; + } else { + $inputs = array('amount' => $amount); + $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}/{$charge_id}/refund", + 'POST', $inputs); + $this->curl->send(); + $this->curl->unpack(); + $this->response = $this->curl->response_object; + $this->status = $this->curl->status; + if ($this->curl->status == 200) { + // Zero is always a good number to return when there is no error + return 0; + } else { + // Just pass the status code from Affirm through the API + return $this->curl->status; + } + } + } + + /** + * Updates the shipping information + * + * @param string $charge_id Unique Charge ID from Affirm + * @param string $order_id Optional order ID for your records + * @param string $carrier Optional shipping carrier name + * @param string $confirmation Optional confirmation number + * + * @return int $status Status as an integer, 0 meaning success + */ + public function update_shipping($charge_id, $order_id = null, $carrier = null, $confirmation = null) + { + if ($charge_id == '') { + // Make something look like the Affirm error object + $this->response = (object)array( + 'status_code' => 1, + 'type' => 'invalid_request', + 'code' => 'invalid_field', + 'message' => 'Charge ID is empty, could not send to Affirm', + 'field' => 'charge_id', + ); + return 1; + } else { + $inputs = array(); + if (!is_null($order_id)) { + $inputs['order_id'] = "{$order_id}"; + } + if (!is_null($carrier)) { + $inputs['shipping_carrier'] = "{$carrier}"; + } + if (!is_null($order_id)) { + $inputs['shipping_confirmation'] = "{$confirmation}"; + } + if (count($inputs) == 0) { + $inputs = '{}'; + } + $this->curl = new AffirmCurl("https://{$this->public_key}:{$this->private_key}@{$this->base_url}/{$charge_id}/update", + 'POST', $inputs); + $this->curl->send(); + $this->curl->unpack(); + $this->response = $this->curl->response_object; + $this->status = $this->curl->status; + if ($this->curl->status == 200) { + // Zero is always a good number to return when there is no error + return 0; + } else { + // Just pass the status code from Affirm through the API + return $this->curl->status; + } + } + } +} diff --git a/config.php.default b/src/AffirmConfig.php similarity index 50% rename from config.php.default rename to src/AffirmConfig.php index 67cfda8..3db84dc 100644 --- a/config.php.default +++ b/src/AffirmConfig.php @@ -1,5 +1,7 @@ + * @copyright Copyright (c) 2015 + * @license http://www.gnu.org/licenses/gpl-3.0.txt + * @version Release: @package_version@ + * + */ +class AffirmCurl +{ + public $url; + /**< URL to send the request */ + public $post_body; + /**< Post body to send to Affirm */ + public $method; + /**< HTTP Method to send */ + public $curl; + /**< cURL handle keeping track of this */ + public $status; + /**< stores the HTTP status from cURL response */ + public $headers; + /**< stores the headers from the cURL response */ + public $response; + /**< stores the raw response body */ + public $response_object; + /**< response in object form, if available */ + public $options; + /**< stores the cURL options */ + + /** + * Constructor + * + * @param string $url URL to request + * @param string $method HTTP Method + * @param array|string $data Data to pack and send to Affirm + * + * @throws InvalidArgumentException + */ + public function __construct($url, $method = 'GET', $data = '') + { + if (is_null($data)) { + $this->post_body = ''; + } elseif (is_array($data)) { + $this->post_body = json_encode($data, JSON_UNESCAPED_SLASHES); + } else { + $this->post_body = $data; + } + if (is_null($url)) { + throw new \InvalidArgumentException('Missing the URL!'); + } + $this->status = 0; + $this->method = $method; + $this->url = $url; + $this->options = array( + CURLOPT_POST => true, + CURLOPT_URL => $this->url, + CURLOPT_POSTFIELDS => $this->post_body, + CURLOPT_HTTPHEADER => array("Content-Type: application/json"), + CURLOPT_SSL_VERIFYPEER => false, + CURLOPT_CUSTOMREQUEST => $this->method, + ); + $this->curl = curl_init(); + } + + /** + * Sends the request to the remote server + * + * @throws RuntimeException + */ + public function send() + { + ob_start(); + curl_setopt_array($this->curl, $this->options); + $success = curl_exec($this->curl); + if ($success) { + $this->headers = curl_getinfo($this->curl); + $this->status = $this->headers['http_code']; + $this->response = ob_get_clean(); + curl_close($this->curl); + } else { + throw new RuntimeException('Unable to send cURL request'); + } + } + + /** + * + */ + public function unpack() + { + if ($this->headers['content_type'] == 'application/json' && $this->status > 0) { + $this->response_object = json_decode($this->response); + } else { + $this->response_object = null; + } + } +} diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..c963506 --- /dev/null +++ b/src/Exception/InvalidArgumentException.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2015 + * @license http://www.gnu.org/licenses/gpl-3.0.txt + * @version Release: @package_version@ + * + */ +class InvalidArgumentException extends \InvalidArgumentException{} \ No newline at end of file diff --git a/src/Exception/RuntimeException.php b/src/Exception/RuntimeException.php new file mode 100644 index 0000000..a3942ae --- /dev/null +++ b/src/Exception/RuntimeException.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2015 + * @license http://www.gnu.org/licenses/gpl-3.0.txt + * @version Release: @package_version@ + * + */ +class RuntimeException extends \RuntimeException{} \ No newline at end of file