function __construct() { // This might lead autoloader to traverse folers //require_once(APPPATH.'third_party/stripe/vendor/autoload.php'); $ci =& get_instance(); $ci->load->config('stripe', TRUE); $this->config = $ci->config->item('stripe'); loadThirdParty('stripe', 'init'); \Stripe\Stripe::setApiKey($this->config['secret_key']); if (!defined('STRIPE_PUBLIC_KEY')) { define('STRIPE_PUBLIC_KEY', $this->config['publishable_key']); } }
call_user_func_array(array($dispatch, $action), $queryString); } else { /* Error Generation Code Here */ } } /** Autoload any classes that are required **/ function __autoload($className) { if (file_exists(LEONILIB . strtolower($className) . '.class.php')) { require_once LEONILIB . strtolower($className) . '.class.php'; } else { if (file_exists(ROOT . DS . 'app' . DS . 'controllers' . DS . strtolower($className) . '.php')) { require_once ROOT . DS . 'app' . DS . 'controllers' . DS . strtolower($className) . '.php'; } else { if (file_exists(ROOT . DS . 'app' . DS . 'models' . DS . strtolower($className) . '.php')) { require_once ROOT . DS . 'app' . DS . 'models' . DS . strtolower($className) . '.php'; } else { /* Error Generation Code Here */ } } } } function loadThirdParty() { require_once THIRDPARTY . 'manager.php'; } setReporting(); removeMagicQuotes(); unregisterGlobals(); loadThirdParty(); callHook();