Changeset 1842
- Timestamp:
- 01/28/2008 10:02:04 AM (12 months ago)
- Location:
- trunk/system
- Files:
-
- 12 modified
-
core/Kohana.php (modified) (4 diffs)
-
libraries/Archive.php (modified) (1 diff)
-
libraries/Cache.php (modified) (1 diff)
-
libraries/Database.php (modified) (1 diff)
-
libraries/Image.php (modified) (1 diff)
-
libraries/Payment.php (modified) (1 diff)
-
libraries/Session.php (modified) (1 diff)
-
libraries/drivers/Payment/Authorize.php (modified) (1 diff)
-
libraries/drivers/Payment/Paypal.php (modified) (1 diff)
-
libraries/drivers/Payment/Trident.php (modified) (1 diff)
-
libraries/drivers/Payment/Trustcommerce.php (modified) (1 diff)
-
libraries/drivers/Payment/Yourpay.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/core/Kohana.php
r1810 r1842 558 558 * @throws Kohana_Exception 559 559 * @param string name of class 560 * @return void560 * @return bool 561 561 */ 562 562 public static function auto_load($class) … … 594 594 case 'Driver': 595 595 $type = 'libraries/drivers'; 596 $file = s ubstr($class, 0, -7);596 $file = str_replace('_', '/', substr($class, 0, -7)); 597 597 break; 598 598 default: … … 607 607 // If the file doesn't exist, just return 608 608 if (($filepath = self::find_file($type, $file)) === FALSE) 609 return ;609 return FALSE; 610 610 611 611 // Load the requested file … … 626 626 } 627 627 } 628 629 return TRUE; 628 630 } 629 631 -
trunk/system/libraries/Archive.php
r1814 r1842 29 29 $type = empty($type) ? 'zip' : $type; 30 30 31 try 32 { 33 // Set driver name 34 $driver = 'Archive_'.ucfirst($type).'_Driver'; 31 // Set driver name 32 $driver = 'Archive_'.ucfirst($type).'_Driver'; 35 33 36 // Manually load so that exceptions can be caught 37 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 38 } 39 catch (Kohana_Exception $exception) 40 { 34 // Load the driver 35 if ( ! Kohana::auto_load($driver)) 41 36 throw new Kohana_Exception('archive.driver_not_supported', $type); 42 }43 37 44 38 // Initialize the driver -
trunk/system/libraries/Cache.php
r1814 r1842 34 34 $this->config = (array) $config + Config::item('cache'); 35 35 36 try 37 { 38 // Set driver name 39 $driver = 'Cache_'.ucfirst($this->config['driver']).'_Driver'; 40 41 // Manually load so that exceptions can be caught 42 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 43 } 44 catch (Kohana_Exception $e) 45 { 36 // Set driver name 37 $driver = 'Cache_'.ucfirst($this->config['driver']).'_Driver'; 38 39 // Load the driver 40 if ( ! Kohana::auto_load($driver)) 46 41 throw new Kohana_Exception('cache.driver_not_supported', $this->config['driver']); 47 }48 42 49 43 // Initialize the driver -
trunk/system/libraries/Database.php
r1836 r1842 151 151 $this->config['connection'] = $db; 152 152 153 try 154 { 155 // Set driver name 156 $driver = 'Database_'.ucfirst($this->config['connection']['type']).'_Driver'; 157 158 // Manually load so that exceptions can be caught 159 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 160 } 161 catch (Kohana_Exception $e) 162 { 153 // Set driver name 154 $driver = 'Database_'.ucfirst($this->config['connection']['type']).'_Driver'; 155 156 // Load the driver 157 if ( ! Kohana::auto_load($driver)) 163 158 throw new Kohana_Database_Exception('database.driver_not_supported', $this->config['connection']['type']); 164 }165 159 166 160 // Initialize the driver -
trunk/system/libraries/Image.php
r1827 r1842 94 94 $this->config = (array) $config + Config::item('image'); 95 95 96 try 97 { 98 // Set driver name 99 $driver = 'Image_'.ucfirst($this->config['driver']).'_Driver'; 100 101 // Manually load so that exceptions can be caught 102 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 103 } 104 catch (Kohana_Exception $e) 105 { 96 // Set driver class name 97 $driver = 'Image_'.ucfirst($this->config['driver']).'_Driver'; 98 99 // Load the driver 100 if ( ! Kohana::auto_load($driver)) 106 101 throw new Kohana_Exception('image.driver_not_supported', $this->config['driver']); 107 }108 102 109 103 // Initialize the driver -
trunk/system/libraries/Payment.php
r1814 r1842 78 78 $this->config = array_merge($this->config, Config::item('payment.'.$this->config['driver'])); 79 79 80 try 81 { 82 // Set driver name 83 $driver = 'Payment_'.ucfirst($this->config['driver']).'_Driver'; 80 // Set driver name 81 $driver = 'Payment_'.ucfirst($this->config['driver']).'_Driver'; 84 82 85 // Manually load so that exceptions can be caught 86 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 87 } 88 catch (Kohana_Exception $e) 89 { 83 // Load the driver 84 if ( ! Kohana::auto_load($driver)) 90 85 throw new Kohana_Exception('payment.driver_not_supported', $this->config['driver']); 91 }92 86 93 87 // Initialize the driver -
trunk/system/libraries/Session.php
r1814 r1842 56 56 if (self::$config['driver'] != 'native') 57 57 { 58 try 59 { 60 // Set driver name 61 $driver = 'Session_'.ucfirst(self::$config['driver']).'_Driver'; 62 63 // Manually load so that exceptions can be caught 64 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 65 } 66 catch (Kohana_Exception $e) 67 { 58 // Set driver name 59 $driver = 'Session_'.ucfirst(self::$config['driver']).'_Driver'; 60 61 // Load the driver 62 if ( ! Kohana::auto_load($driver)) 68 63 throw new Kohana_Exception('session.driver_not_supported', self::$config['driver']); 69 }70 64 71 65 // Initialize the driver -
trunk/system/libraries/drivers/Payment/Authorize.php
r1841 r1842 12 12 { 13 13 // Fields required to do a transaction 14 private $required_fields = array('x_login' => FALSE, 15 'x_version' => TRUE, 16 'x_delim_char' => TRUE, 17 'x_url' => TRUE, 18 'x_type' => TRUE, 19 'x_method' => TRUE, 20 'x_tran_key' => FALSE, 21 'x_relay_response' => TRUE, 22 'x_card_num' => FALSE, 23 'x_expiration_date' => FALSE, 24 'x_amount' => FALSE, 25 ); 14 private $required_fields = array 15 ( 16 'x_login' => FALSE, 17 'x_version' => TRUE, 18 'x_delim_char' => TRUE, 19 'x_url' => TRUE, 20 'x_type' => TRUE, 21 'x_method' => TRUE, 22 'x_tran_key' => FALSE, 23 'x_relay_response' => TRUE, 24 'x_card_num' => FALSE, 25 'x_expiration_date' => FALSE, 26 'x_amount' => FALSE, 27 ); 28 26 29 // Default required values 27 30 private $authnet_values = array -
trunk/system/libraries/drivers/Payment/Paypal.php
r1841 r1842 16 16 class Payment_Paypal_Driver { 17 17 18 private $required_fields = array('API_UserName' => FALSE, 19 'API_Password' => FALSE, 20 'API_Signature' => FALSE, 21 'API_Endpoint' => TRUE, 22 'version' => TRUE, 23 'Amt' => FALSE, 24 'PAYMENTACTION' => TRUE, 25 'ReturnUrl' => FALSE, 26 'CANCELURL' => FALSE, 27 'CURRENCYCODE' => TRUE); 28 29 private $paypal_values = array('API_UserName' => '', 30 'API_Password' => '', 31 'API_Signature' => '', 32 'API_Endpoint' => 'https://api-3t.paypal.com/nvp', 33 'version' => '3.0', 34 'Amt' => 0, 35 'PAYMENTACTION' => 'Sale', 36 'ReturnUrl' => '', 37 'CANCELURL' => '', 38 'error_url' => '', 39 'CURRENCYCODE' => 'USD', 40 'payerid' => ''); 18 private $required_fields = array 19 ( 20 'API_UserName' => FALSE, 21 'API_Password' => FALSE, 22 'API_Signature' => FALSE, 23 'API_Endpoint' => TRUE, 24 'version' => TRUE, 25 'Amt' => FALSE, 26 'PAYMENTACTION' => TRUE, 27 'ReturnUrl' => FALSE, 28 'CANCELURL' => FALSE, 29 'CURRENCYCODE' => TRUE 30 ); 31 32 private $paypal_values = array 33 ( 34 'API_UserName' => '', 35 'API_Password' => '', 36 'API_Signature' => '', 37 'API_Endpoint' => 'https://api-3t.paypal.com/nvp', 38 'version' => '3.0', 39 'Amt' => 0, 40 'PAYMENTACTION' => 'Sale', 41 'ReturnUrl' => '', 42 'CANCELURL' => '', 43 'error_url' => '', 44 'CURRENCYCODE' => 'USD', 45 'payerid' => '' 46 ); 41 47 42 48 private $paypal_url = ''; -
trunk/system/libraries/drivers/Payment/Trident.php
r1841 r1842 12 12 { 13 13 // Fields required to do a transaction 14 private $required_fields = array('profile_id' => FALSE, 15 'profile_key' => FALSE, 16 'card_number' => FALSE, 17 'card_exp_date' => FALSE, 18 'transaction_amount' => FALSE, 19 'transaction_type' => FALSE); 14 private $required_fields = array 15 ( 16 'profile_id' => FALSE, 17 'profile_key' => FALSE, 18 'card_number' => FALSE, 19 'card_exp_date' => FALSE, 20 'transaction_amount' => FALSE, 21 'transaction_type' => FALSE 22 ); 20 23 21 private $fields = array('profile_id' => '', 22 'profile_key' => '', 23 'card_number' => '', 24 'card_exp_date' => '', 25 'transaction_amount' => '', 26 'transaction_type' => ''); 24 private $fields = array 25 ( 26 'profile_id' => '', 27 'profile_key' => '', 28 'card_number' => '', 29 'card_exp_date' => '', 30 'transaction_amount' => '', 31 'transaction_type' => '' 32 ); 27 33 28 34 private $test_mode = TRUE; -
trunk/system/libraries/drivers/Payment/Trustcommerce.php
r1841 r1842 12 12 { 13 13 // Fields required to do a transaction 14 private $required_fields = array('custid' => TRUE, 15 'password' => TRUE, 16 'action' => TRUE, 17 'media' => TRUE, 18 'cc' => FALSE, 19 'exp' => FALSE, 20 'amount' => FALSE 21 ); 14 private $required_fields = array 15 ( 16 'custid' => TRUE, 17 'password' => TRUE, 18 'action' => TRUE, 19 'media' => TRUE, 20 'cc' => FALSE, 21 'exp' => FALSE, 22 'amount' => FALSE 23 ); 22 24 23 25 private $tclink_library = './path/to/library'; -
trunk/system/libraries/drivers/Payment/Yourpay.php
r1841 r1842 12 12 { 13 13 // Fields required to do a transaction 14 private $required_fields = array('card_num' => FALSE, 15 'expiration_date' => FALSE, 16 'amount' => FALSE, 17 'tax' => FALSE, 18 'shipping' => FALSE, 19 'cvm_value' => FALSE 20 ); 14 private $required_fields = array 15 ( 16 'card_num' => FALSE, 17 'expiration_date' => FALSE, 18 'amount' => FALSE, 19 'tax' => FALSE, 20 'shipping' => FALSE, 21 'cvm_value' => FALSE 22 ); 23 21 24 // Default required values 22 25 private $fields = array
