|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once('Zend/Gdata/Books.php'); 00028 00032 require_once('Zend/Gdata/Query.php'); 00033 00043 class Zend_Gdata_Books_VolumeQuery extends Zend_Gdata_Query 00044 { 00045 00052 public function __construct($url = null) 00053 { 00054 parent::__construct($url); 00055 } 00056 00063 public function setMinViewability($value = null) 00064 { 00065 switch ($value) { 00066 case 'full_view': 00067 $this->_params['min-viewability'] = 'full'; 00068 break; 00069 case 'partial_view': 00070 $this->_params['min-viewability'] = 'partial'; 00071 break; 00072 case null: 00073 unset($this->_params['min-viewability']); 00074 break; 00075 } 00076 return $this; 00077 } 00078 00084 public function getMinViewability() 00085 { 00086 if (array_key_exists('min-viewability', $this->_params)) { 00087 return $this->_params['min-viewability']; 00088 } else { 00089 return null; 00090 } 00091 } 00092 00098 public function getQueryUrl() 00099 { 00100 if (isset($this->_url)) { 00101 $url = $this->_url; 00102 } else { 00103 $url = Zend_Gdata_Books::VOLUME_FEED_URI; 00104 } 00105 if ($this->getCategory() !== null) { 00106 $url .= '/-/' . $this->getCategory(); 00107 } 00108 $url = $url . $this->getQueryString(); 00109 return $url; 00110 } 00111 00112 }