Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Service/Amazon/Abstract.php
Go to the documentation of this file.
00001 <?php
00026 require_once 'Zend/Service/Abstract.php';
00027 
00038 abstract class Zend_Service_Amazon_Abstract extends Zend_Service_Abstract
00039 {
00043     protected static $_defaultAccessKey = null;
00044 
00048     protected static $_defaultSecretKey = null;
00049 
00053     protected $_secretKey;
00054 
00058     protected $_accessKey;
00059 
00060 
00068     public static function setKeys($accessKey, $secretKey)
00069     {
00070         self::$_defaultAccessKey = $accessKey;
00071         self::$_defaultSecretKey = $secretKey;
00072     }
00073 
00081     public function __construct($accessKey=null, $secretKey=null)
00082     {
00083         if(!$accessKey) {
00084             $accessKey = self::$_defaultAccessKey;
00085         }
00086         if(!$secretKey) {
00087             $secretKey = self::$_defaultSecretKey;
00088         }
00089 
00090         if(!$accessKey || !$secretKey) {
00091             require_once 'Zend/Service/Amazon/Exception.php';
00092             throw new Zend_Service_Amazon_Exception("AWS keys were not supplied");
00093         }
00094         $this->_accessKey = $accessKey;
00095         $this->_secretKey = $secretKey;
00096     }
00097 
00098 
00099 
00105     protected function _getAccessKey()
00106     {
00107         return $this->_accessKey;
00108     }
00109 
00115     protected function _getSecretKey()
00116     {
00117         return $this->_secretKey;
00118     }
00119 }
 All Data Structures Namespaces Files Functions Variables Enumerations