Lib_ZF - Version 1.12.10.2

Version Notes

1.12.10.2

Download this release

Release Info

Developer Magento Core Team
Extension Lib_ZF
Version 1.12.10.2
Comparing to
See all releases


Code changes from version 1.12.10.1 to 1.12.10.2

Files changed (214) hide show
  1. lib/Zend/Amf/Server.php +3 -3
  2. lib/Zend/Application.php +4 -2
  3. lib/Zend/Cloud/StorageService/Adapter/FileSystem.php +1 -1
  4. lib/Zend/Console/Getopt.php +3 -3
  5. lib/Zend/Controller/Action/Helper/Redirector.php +2 -2
  6. lib/Zend/Controller/Action/Helper/ViewRenderer.php +15 -7
  7. lib/Zend/Controller/Request/Http.php +14 -0
  8. lib/Zend/Controller/Request/HttpTestCase.php +1 -0
  9. lib/Zend/Controller/Router/Route/Chain.php +5 -4
  10. lib/Zend/Date/DateObject.php +1 -1
  11. lib/Zend/Db/Adapter/Pdo/Abstract.php +2 -1
  12. lib/Zend/Db/Adapter/Pdo/Mssql.php +1 -1
  13. lib/Zend/Db/Select.php +5 -3
  14. lib/Zend/Dom/Query.php +29 -6
  15. lib/Zend/Form.php +1 -1
  16. lib/Zend/Http/Client.php +61 -25
  17. lib/Zend/Http/Client/Adapter/Curl.php +16 -9
  18. lib/Zend/Http/Client/Adapter/Proxy.php +1 -1
  19. lib/Zend/Http/Header/HeaderValue.php +127 -0
  20. lib/Zend/Http/Header/SetCookie.php +8 -0
  21. lib/Zend/Http/Response.php +55 -19
  22. lib/Zend/Http/UserAgent/AbstractDevice.php +3 -1
  23. lib/Zend/Loader/Autoloader.php +1 -1
  24. lib/Zend/Log.php +20 -5
  25. lib/Zend/Mail/Header/HeaderName.php +92 -0
  26. lib/Zend/Mail/Header/HeaderValue.php +136 -0
  27. lib/Zend/Mail/Message.php +1 -0
  28. lib/Zend/Mail/Part.php +37 -3
  29. lib/Zend/Mail/Storage.php +1 -0
  30. lib/Zend/Mail/Storage/Imap.php +2 -0
  31. lib/Zend/Measure/Number.php +6 -0
  32. lib/Zend/Registry.php +1 -1
  33. lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php +3 -2
  34. lib/Zend/Serializer/Adapter/PythonPickle.php +0 -16
  35. lib/Zend/Service/DeveloperGarden/BaseUserService.php +0 -399
  36. lib/Zend/Service/DeveloperGarden/BaseUserService/AccountBalance.php +0 -62
  37. lib/Zend/Service/DeveloperGarden/Client/ClientAbstract.php +0 -430
  38. lib/Zend/Service/DeveloperGarden/Client/Exception.php +0 -38
  39. lib/Zend/Service/DeveloperGarden/Client/Soap.php +0 -340
  40. lib/Zend/Service/DeveloperGarden/ConferenceCall.php +0 -872
  41. lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceAccount.php +0 -62
  42. lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceDetail.php +0 -129
  43. lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceSchedule.php +0 -262
  44. lib/Zend/Service/DeveloperGarden/ConferenceCall/Exception.php +0 -38
  45. lib/Zend/Service/DeveloperGarden/ConferenceCall/Participant.php +0 -84
  46. lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantDetail.php +0 -195
  47. lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantStatus.php +0 -103
  48. lib/Zend/Service/DeveloperGarden/Credential.php +0 -186
  49. lib/Zend/Service/DeveloperGarden/Exception.php +0 -38
  50. lib/Zend/Service/DeveloperGarden/IpLocation.php +0 -120
  51. lib/Zend/Service/DeveloperGarden/IpLocation/IpAddress.php +0 -130
  52. lib/Zend/Service/DeveloperGarden/LocalSearch.php +0 -105
  53. lib/Zend/Service/DeveloperGarden/LocalSearch/Exception.php +0 -38
  54. lib/Zend/Service/DeveloperGarden/LocalSearch/SearchParameters.php +0 -536
  55. lib/Zend/Service/DeveloperGarden/Request/BaseUserService/ChangeQuotaPool.php +0 -103
  56. lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetAccountBalance.php +0 -72
  57. lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetQuotaInformation.php +0 -72
  58. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/AddConferenceTemplateParticipantRequest.php +0 -91
  59. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CommitConferenceRequest.php +0 -69
  60. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceRequest.php +0 -136
  61. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceTemplateRequest.php +0 -113
  62. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceListRequest.php +0 -104
  63. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceStatusRequest.php +0 -106
  64. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateListRequest.php +0 -69
  65. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateParticipantRequest.php +0 -90
  66. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateRequest.php +0 -69
  67. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetParticipantStatusRequest.php +0 -90
  68. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetRunningConferenceRequest.php +0 -69
  69. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/NewParticipantRequest.php +0 -91
  70. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceRequest.php +0 -69
  71. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateParticipantRequest.php +0 -90
  72. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateRequest.php +0 -69
  73. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveParticipantRequest.php +0 -90
  74. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceRequest.php +0 -158
  75. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateParticipantRequest.php +0 -113
  76. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateRequest.php +0 -113
  77. lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateParticipantRequest.php +0 -138
  78. lib/Zend/Service/DeveloperGarden/Request/Exception.php +0 -39
  79. lib/Zend/Service/DeveloperGarden/Request/IpLocation/LocateIPRequest.php +0 -114
  80. lib/Zend/Service/DeveloperGarden/Request/LocalSearch/LocalSearchRequest.php +0 -113
  81. lib/Zend/Service/DeveloperGarden/Request/RequestAbstract.php +0 -72
  82. lib/Zend/Service/DeveloperGarden/Request/SendSms/SendFlashSMS.php +0 -46
  83. lib/Zend/Service/DeveloperGarden/Request/SendSms/SendSMS.php +0 -46
  84. lib/Zend/Service/DeveloperGarden/Request/SendSms/SendSmsAbstract.php +0 -281
  85. lib/Zend/Service/DeveloperGarden/Request/SmsValidation/GetValidatedNumbers.php +0 -39
  86. lib/Zend/Service/DeveloperGarden/Request/SmsValidation/Invalidate.php +0 -80
  87. lib/Zend/Service/DeveloperGarden/Request/SmsValidation/SendValidationKeyword.php +0 -39
  88. lib/Zend/Service/DeveloperGarden/Request/SmsValidation/Validate.php +0 -110
  89. lib/Zend/Service/DeveloperGarden/Request/VoiceButler/CallStatus.php +0 -100
  90. lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCall.php +0 -238
  91. lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCallSequenced.php +0 -92
  92. lib/Zend/Service/DeveloperGarden/Request/VoiceButler/TearDownCall.php +0 -78
  93. lib/Zend/Service/DeveloperGarden/Request/VoiceButler/VoiceButlerAbstract.php +0 -39
  94. lib/Zend/Service/DeveloperGarden/Response/BaseType.php +0 -140
  95. lib/Zend/Service/DeveloperGarden/Response/BaseUserService/ChangeQuotaPoolResponse.php +0 -39
  96. lib/Zend/Service/DeveloperGarden/Response/BaseUserService/GetAccountBalanceResponse.php +0 -39
  97. lib/Zend/Service/DeveloperGarden/Response/BaseUserService/GetQuotaInformationResponse.php +0 -90
  98. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponse.php +0 -45
  99. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponseType.php +0 -55
  100. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CCSResponseType.php +0 -39
  101. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CommitConferenceResponse.php +0 -46
  102. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/ConferenceCallAbstract.php +0 -75
  103. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponse.php +0 -45
  104. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponseType.php +0 -55
  105. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponse.php +0 -45
  106. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponseType.php +0 -55
  107. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponse.php +0 -45
  108. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponseType.php +0 -55
  109. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponse.php +0 -45
  110. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponseType.php +0 -148
  111. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponse.php +0 -45
  112. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponseType.php +0 -55
  113. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponse.php +0 -45
  114. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponseType.php +0 -55
  115. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponse.php +0 -45
  116. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponseType.php +0 -97
  117. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponse.php +0 -45
  118. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponseType.php +0 -55
  119. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponse.php +0 -45
  120. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponseType.php +0 -55
  121. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponse.php +0 -45
  122. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponseType.php +0 -55
  123. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceResponse.php +0 -46
  124. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceTemplateParticipantResponse.php +0 -46
  125. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceTemplateResponse.php +0 -46
  126. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveParticipantResponse.php +0 -46
  127. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceResponse.php +0 -46
  128. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceTemplateParticipantResponse.php +0 -46
  129. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceTemplateResponse.php +0 -46
  130. lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateParticipantResponse.php +0 -46
  131. lib/Zend/Service/DeveloperGarden/Response/Exception.php +0 -39
  132. lib/Zend/Service/DeveloperGarden/Response/IpLocation/CityType.php +0 -77
  133. lib/Zend/Service/DeveloperGarden/Response/IpLocation/GeoCoordinatesType.php +0 -66
  134. lib/Zend/Service/DeveloperGarden/Response/IpLocation/IPAddressLocationType.php +0 -141
  135. lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponse.php +0 -98
  136. lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponseType.php +0 -46
  137. lib/Zend/Service/DeveloperGarden/Response/IpLocation/RegionType.php +0 -80
  138. lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponse.php +0 -89
  139. lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponseType.php +0 -44
  140. lib/Zend/Service/DeveloperGarden/Response/ResponseAbstract.php +0 -111
  141. lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Exception.php +0 -39
  142. lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/GetTokensResponse.php +0 -94
  143. lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Interface.php +0 -40
  144. lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/SecurityTokenResponse.php +0 -116
  145. lib/Zend/Service/DeveloperGarden/Response/SendSms/SendFlashSMSResponse.php +0 -39
  146. lib/Zend/Service/DeveloperGarden/Response/SendSms/SendSMSResponse.php +0 -39
  147. lib/Zend/Service/DeveloperGarden/Response/SendSms/SendSmsAbstract.php +0 -119
  148. lib/Zend/Service/DeveloperGarden/Response/SmsValidation/GetValidatedNumbersResponse.php +0 -55
  149. lib/Zend/Service/DeveloperGarden/Response/SmsValidation/InvalidateResponse.php +0 -39
  150. lib/Zend/Service/DeveloperGarden/Response/SmsValidation/SendValidationKeywordResponse.php +0 -39
  151. lib/Zend/Service/DeveloperGarden/Response/SmsValidation/ValidateResponse.php +0 -39
  152. lib/Zend/Service/DeveloperGarden/Response/SmsValidation/ValidatedNumber.php +0 -64
  153. lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatus2Response.php +0 -88
  154. lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatusResponse.php +0 -154
  155. lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallResponse.php +0 -60
  156. lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallSequencedResponse.php +0 -39
  157. lib/Zend/Service/DeveloperGarden/Response/VoiceButler/TearDownCallResponse.php +0 -50
  158. lib/Zend/Service/DeveloperGarden/Response/VoiceButler/VoiceButlerAbstract.php +0 -128
  159. lib/Zend/Service/DeveloperGarden/SecurityTokenServer.php +0 -127
  160. lib/Zend/Service/DeveloperGarden/SecurityTokenServer/Cache.php +0 -207
  161. lib/Zend/Service/DeveloperGarden/SendSms.php +0 -156
  162. lib/Zend/Service/DeveloperGarden/SmsValidation.php +0 -193
  163. lib/Zend/Service/DeveloperGarden/VoiceCall.php +0 -226
  164. lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.wsdl +0 -84
  165. lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.xsd +0 -69
  166. lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.wsdl +0 -104
  167. lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.xsd +0 -72
  168. lib/Zend/Service/DeveloperGarden/Wsdl/SmsService.wsdl +0 -122
  169. lib/Zend/Service/DeveloperGarden/Wsdl/SmsValidationUserService.wsdl +0 -169
  170. lib/Zend/Service/DeveloperGarden/Wsdl/TokenService.wsdl +0 -353
  171. lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.wsdl +0 -164
  172. lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.xsd +0 -264
  173. lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.wsdl +0 -463
  174. lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.xsd +0 -736
  175. lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.wsdl +0 -83
  176. lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.xsd +0 -31
  177. lib/Zend/Service/Technorati.php +0 -1035
  178. lib/Zend/Service/Technorati/Author.php +0 -242
  179. lib/Zend/Service/Technorati/BlogInfoResult.php +0 -161
  180. lib/Zend/Service/Technorati/CosmosResult.php +0 -152
  181. lib/Zend/Service/Technorati/CosmosResultSet.php +0 -176
  182. lib/Zend/Service/Technorati/DailyCountsResult.php +0 -93
  183. lib/Zend/Service/Technorati/DailyCountsResultSet.php +0 -125
  184. lib/Zend/Service/Technorati/GetInfoResult.php +0 -103
  185. lib/Zend/Service/Technorati/KeyInfoResult.php +0 -118
  186. lib/Zend/Service/Technorati/Result.php +0 -121
  187. lib/Zend/Service/Technorati/ResultSet.php +0 -289
  188. lib/Zend/Service/Technorati/SearchResult.php +0 -150
  189. lib/Zend/Service/Technorati/SearchResultSet.php +0 -79
  190. lib/Zend/Service/Technorati/TagResult.php +0 -171
  191. lib/Zend/Service/Technorati/TagResultSet.php +0 -110
  192. lib/Zend/Service/Technorati/TagsResult.php +0 -93
  193. lib/Zend/Service/Technorati/TagsResultSet.php +0 -67
  194. lib/Zend/Service/Technorati/Utils.php +0 -136
  195. lib/Zend/Service/Technorati/Weblog.php +0 -486
  196. lib/Zend/Service/WindowsAzure/CommandLine/PackageScaffolder/PackageScaffolderAbstract.php +7 -5
  197. lib/Zend/Session.php +3 -3
  198. lib/Zend/{Service/Technorati → Session/Validator}/Exception.php +11 -7
  199. lib/Zend/Translate.php +6 -2
  200. lib/Zend/Translate/Adapter.php +3 -1
  201. lib/Zend/Translate/Plural.php +1 -1
  202. lib/Zend/Validate/EmailAddress.php +1 -1
  203. lib/Zend/Validate/Hostname.php +2 -2
  204. lib/Zend/Version.php +1 -1
  205. lib/Zend/View.php +53 -4
  206. lib/Zend/View/Helper/HeadLink.php +12 -1
  207. lib/Zend/View/Helper/HeadMeta.php +16 -0
  208. lib/Zend/View/Helper/HeadScript.php +13 -1
  209. lib/Zend/View/Helper/HeadStyle.php +8 -1
  210. lib/Zend/View/Helper/Navigation.php +4 -0
  211. lib/Zend/View/Helper/Navigation/HelperAbstract.php +1 -1
  212. lib/Zend/Xml/Security.php +340 -11
  213. lib/Zend/XmlRpc/Server.php +4 -4
  214. package.xml +6 -6
lib/Zend/Amf/Server.php CHANGED
@@ -767,9 +767,9 @@ class Zend_Amf_Server implements Zend_Server_Interface
767
throw new Zend_Amf_Server_Exception('Invalid method or class; must be a classname or object');
768
}
769
770
- $argv = null;
771
if (2 < func_num_args()) {
772
- $argv = array_slice(func_get_args(), 2);
773
}
774
775
// Use the class name as the name space by default.
@@ -780,7 +780,7 @@ class Zend_Amf_Server implements Zend_Server_Interface
780
781
$this->_classAllowed[is_object($class) ? get_class($class) : $class] = true;
782
783
- $this->_methods[] = Zend_Server_Reflection::reflectClass($class, $argv, $namespace);
784
$this->_buildDispatchTable();
785
786
return $this;
767
throw new Zend_Amf_Server_Exception('Invalid method or class; must be a classname or object');
768
}
769
770
+ $args = null;
771
if (2 < func_num_args()) {
772
+ $args = array_slice(func_get_args(), 2);
773
}
774
775
// Use the class name as the name space by default.
780
781
$this->_classAllowed[is_object($class) ? get_class($class) : $class] = true;
782
783
+ $this->_methods[] = Zend_Server_Reflection::reflectClass($class, $args, $namespace);
784
$this->_buildDispatchTable();
785
786
return $this;
lib/Zend/Application.php CHANGED
@@ -70,15 +70,17 @@ class Zend_Application
70
*
71
* @param string $environment
72
* @param string|array|Zend_Config $options String path to configuration file, or array/Zend_Config of configuration options
73
* @throws Zend_Application_Exception When invalid options are provided
74
* @return void
75
*/
76
- public function __construct($environment, $options = null)
77
{
78
$this->_environment = (string) $environment;
79
80
- require_once 'Zend/Loader/Autoloader.php';
81
$this->_autoloader = Zend_Loader_Autoloader::getInstance();
82
83
if (null !== $options) {
84
if (is_string($options)) {
70
*
71
* @param string $environment
72
* @param string|array|Zend_Config $options String path to configuration file, or array/Zend_Config of configuration options
73
+ * @param bool $suppressNotFoundWarnings Should warnings be suppressed when a file is not found during autoloading?
74
* @throws Zend_Application_Exception When invalid options are provided
75
* @return void
76
*/
77
+ public function __construct($environment, $options = null, $suppressNotFoundWarnings = null)
78
{
79
$this->_environment = (string) $environment;
80
81
+ #require_once 'Zend/Loader/Autoloader.php';
82
$this->_autoloader = Zend_Loader_Autoloader::getInstance();
83
+ $this->_autoloader->suppressNotFoundWarnings($suppressNotFoundWarnings);
84
85
if (null !== $options) {
86
if (is_string($options)) {
lib/Zend/Cloud/StorageService/Adapter/FileSystem.php CHANGED
@@ -104,7 +104,7 @@ class Zend_Cloud_StorageService_Adapter_FileSystem implements Zend_Cloud_Storage
104
{
105
$path = $this->_getFullPath($destinationPath);
106
file_put_contents($path, $data);
107
- chmod($path, 0777);
108
}
109
110
/**
104
{
105
$path = $this->_getFullPath($destinationPath);
106
file_put_contents($path, $data);
107
+ chmod($path, 0775);
108
}
109
110
/**
lib/Zend/Console/Getopt.php CHANGED
@@ -173,14 +173,14 @@ class Zend_Console_Getopt
173
);
174
175
/**
176
- * Stores the command-line arguments for the calling applicaion.
177
*
178
* @var array
179
*/
180
protected $_argv = array();
181
182
/**
183
- * Stores the name of the calling applicaion.
184
*
185
* @var string
186
*/
@@ -550,7 +550,7 @@ class Zend_Console_Getopt
550
* current application invocation.
551
*
552
* This function returns true, or the parameter value to the option, if any.
553
- * If the option was not given, this function returns false.
554
*
555
* @param string $flag
556
* @return mixed
173
);
174
175
/**
176
+ * Stores the command-line arguments for the calling application.
177
*
178
* @var array
179
*/
180
protected $_argv = array();
181
182
/**
183
+ * Stores the name of the calling application.
184
*
185
* @var string
186
*/
550
* current application invocation.
551
*
552
* This function returns true, or the parameter value to the option, if any.
553
+ * If the option was not given, this function returns null.
554
*
555
* @param string $flag
556
* @return mixed
lib/Zend/Controller/Action/Helper/Redirector.php CHANGED
@@ -406,7 +406,7 @@ class Zend_Controller_Action_Helper_Redirector extends Zend_Controller_Action_He
406
/**
407
* Redirect to a route-based URL
408
*
409
- * Uses route's assemble method tobuild the URL; route is specified by $name;
410
* default route is used if none provided.
411
*
412
* @param array $urlOptions Array of key/value pairs used to assemble URL
@@ -427,7 +427,7 @@ class Zend_Controller_Action_Helper_Redirector extends Zend_Controller_Action_He
427
/**
428
* Redirect to a route-based URL, and immediately exit
429
*
430
- * Uses route's assemble method tobuild the URL; route is specified by $name;
431
* default route is used if none provided.
432
*
433
* @param array $urlOptions Array of key/value pairs used to assemble URL
406
/**
407
* Redirect to a route-based URL
408
*
409
+ * Uses route's assemble method to build the URL; route is specified by $name;
410
* default route is used if none provided.
411
*
412
* @param array $urlOptions Array of key/value pairs used to assemble URL
427
/**
428
* Redirect to a route-based URL, and immediately exit
429
*
430
+ * Uses route's assemble method to build the URL; route is specified by $name;
431
* default route is used if none provided.
432
*
433
* @param array $urlOptions Array of key/value pairs used to assemble URL
lib/Zend/Controller/Action/Helper/ViewRenderer.php CHANGED
@@ -841,13 +841,21 @@ class Zend_Controller_Action_Helper_ViewRenderer extends Zend_Controller_Action_
841
$inflector = $this->getInflector();
842
$request = $this->getRequest();
843
$dispatcher = $this->getFrontController()->getDispatcher();
844
- $module = $dispatcher->formatModuleName($request->getModuleName());
845
- $controller = substr(
846
- $dispatcher->formatControllerName($request->getControllerName()),
847
- 0,
848
- -10
849
- );
850
- $action = $dispatcher->formatActionName($request->getActionName());
851
852
$params = compact('module', 'controller', 'action');
853
foreach ($vars as $key => $value) {
841
$inflector = $this->getInflector();
842
$request = $this->getRequest();
843
$dispatcher = $this->getFrontController()->getDispatcher();
844
+
845
+ // Format module name
846
+ $module = $dispatcher->formatModuleName($request->getModuleName());
847
+
848
+ // Format controller name
849
+ #require_once 'Zend/Filter/Word/CamelCaseToDash.php';
850
+ $filter = new Zend_Filter_Word_CamelCaseToDash();
851
+ $controller = $filter->filter($request->getControllerName());
852
+ $controller = $dispatcher->formatControllerName($controller);
853
+ if ('Controller' == substr($controller, -10)) {
854
+ $controller = substr($controller, 0, -10);
855
+ }
856
+
857
+ // Format action name
858
+ $action = $dispatcher->formatActionName($request->getActionName());
859
860
$params = compact('module', 'controller', 'action');
861
foreach ($vars as $key => $value) {
lib/Zend/Controller/Request/Http.php CHANGED
@@ -917,6 +917,20 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
917
return false;
918
}
919
920
/**
921
* Is the request a Javascript XMLHttpRequest?
922
*
917
return false;
918
}
919
920
+ /**
921
+ * Was the request made by PATCH?
922
+ *
923
+ * @return boolean
924
+ */
925
+ public function isPatch()
926
+ {
927
+ if ('PATCH' == $this->getMethod()) {
928
+ return true;
929
+ }
930
+
931
+ return false;
932
+ }
933
+
934
/**
935
* Is the request a Javascript XMLHttpRequest?
936
*
lib/Zend/Controller/Request/HttpTestCase.php CHANGED
@@ -62,6 +62,7 @@ class Zend_Controller_Request_HttpTestCase extends Zend_Controller_Request_Http
62
'GET',
63
'HEAD',
64
'OPTIONS',
65
'POST',
66
'PUT',
67
);
62
'GET',
63
'HEAD',
64
'OPTIONS',
65
+ 'PATCH',
66
'POST',
67
'PUT',
68
);
lib/Zend/Controller/Router/Route/Chain.php CHANGED
@@ -86,10 +86,10 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
86
*/
87
public function match($request, $partial = null)
88
{
89
$path = trim($request->getPathInfo(), self::URI_DELIMITER);
90
$subPath = $path;
91
$values = array();
92
- $numRoutes = count($this->_routes);
93
$matchedPath = null;
94
95
foreach ($this->_routes as $key => $route) {
@@ -101,12 +101,12 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
101
$separator = substr($subPath, 0, strlen($this->_separators[$key]));
102
103
if ($separator !== $this->_separators[$key]) {
104
return false;
105
}
106
107
$subPath = substr($subPath, strlen($separator));
108
}
109
-
110
// TODO: Should be an interface method. Hack for 1.0 BC
111
if (!method_exists($route, 'getVersion') || $route->getVersion() == 1) {
112
$match = $subPath;
@@ -115,8 +115,10 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
115
$match = $request;
116
}
117
118
- $res = $route->match($match, true, ($key == $numRoutes - 1));
119
if ($res === false) {
120
return false;
121
}
122
@@ -124,7 +126,6 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
124
125
if ($matchedPath !== null) {
126
$subPath = substr($subPath, strlen($matchedPath));
127
- $separator = substr($subPath, 0, strlen($this->_separators[$key]));
128
}
129
130
$values = $res + $values;
86
*/
87
public function match($request, $partial = null)
88
{
89
+ $rawPath = $request->getPathInfo();
90
$path = trim($request->getPathInfo(), self::URI_DELIMITER);
91
$subPath = $path;
92
$values = array();
93
$matchedPath = null;
94
95
foreach ($this->_routes as $key => $route) {
101
$separator = substr($subPath, 0, strlen($this->_separators[$key]));
102
103
if ($separator !== $this->_separators[$key]) {
104
+ $request->setPathInfo($rawPath);
105
return false;
106
}
107
108
$subPath = substr($subPath, strlen($separator));
109
}
110
// TODO: Should be an interface method. Hack for 1.0 BC
111
if (!method_exists($route, 'getVersion') || $route->getVersion() == 1) {
112
$match = $subPath;
115
$match = $request;
116
}
117
118
+ $res = $route->match($match, true);
119
+
120
if ($res === false) {
121
+ $request->setPathInfo($rawPath);
122
return false;
123
}
124
126
127
if ($matchedPath !== null) {
128
$subPath = substr($subPath, strlen($matchedPath));
129
}
130
131
$values = $res + $values;
lib/Zend/Date/DateObject.php CHANGED
@@ -318,7 +318,7 @@ abstract class Zend_Date_DateObject {
318
// standard). However, this is not desired, so replacing
319
// all occurrences of "o" not preceded by a backslash
320
// with "Y"
321
- $format = preg_replace('/(?<!\\\\)o\b/', 'Y', $format);
322
$result = ($gmt) ? @gmdate($format, $timestamp) : @date($format, $timestamp);
323
date_default_timezone_set($oldzone);
324
return $result;
318
// standard). However, this is not desired, so replacing
319
// all occurrences of "o" not preceded by a backslash
320
// with "Y"
321
+ $format = preg_replace('/(?<!\\\\)o/', 'Y', $format);
322
$result = ($gmt) ? @gmdate($format, $timestamp) : @date($format, $timestamp);
323
date_default_timezone_set($oldzone);
324
return $result;
lib/Zend/Db/Adapter/Pdo/Abstract.php CHANGED
@@ -292,6 +292,8 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
292
if (is_int($value) || is_float($value)) {
293
return $value;
294
}
295
$this->_connect();
296
return $this->_connection->quote($value);
297
}
@@ -398,4 +400,3 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract
398
}
399
}
400
}
401
-
292
if (is_int($value) || is_float($value)) {
293
return $value;
294
}
295
+ // Fix for null-byte injection
296
+ $value = addcslashes($value, "\000\032");
297
$this->_connect();
298
return $this->_connection->quote($value);
299
}
400
}
401
}
402
}
lib/Zend/Db/Adapter/Pdo/Mssql.php CHANGED
@@ -410,7 +410,7 @@ class Zend_Db_Adapter_Pdo_Mssql extends Zend_Db_Adapter_Pdo_Abstract
410
public function getServerVersion()
411
{
412
try {
413
- $stmt = $this->query("SELECT SERVERPROPERTY('productversion')");
414
$result = $stmt->fetchAll(Zend_Db::FETCH_NUM);
415
if (count($result)) {
416
return $result[0][0];
410
public function getServerVersion()
411
{
412
try {
413
+ $stmt = $this->query("SELECT CAST(SERVERPROPERTY('productversion') AS VARCHAR)");
414
$result = $stmt->fetchAll(Zend_Db::FETCH_NUM);
415
if (count($result)) {
416
return $result[0][0];
lib/Zend/Db/Select.php CHANGED
@@ -81,6 +81,8 @@ class Zend_Db_Select
81
const SQL_ASC = 'ASC';
82
const SQL_DESC = 'DESC';
83
84
/**
85
* Bind variables for query
86
*
@@ -509,7 +511,7 @@ class Zend_Db_Select
509
}
510
511
foreach ($spec as $val) {
512
- if (preg_match('/^([\w]*\(([^\)]|(?1))*\))#x2F;', (string) $val)) {
513
$val = new Zend_Db_Expr($val);
514
}
515
$this->_parts[self::GROUP][] = $val;
@@ -601,7 +603,7 @@ class Zend_Db_Select
601
$val = trim($matches[1]);
602
$direction = $matches[2];
603
}
604
- if (preg_match('/^([\w]*\(([^\)]|(?1))*\))#x2F;', (string) $val)) {
605
$val = new Zend_Db_Expr($val);
606
}
607
$this->_parts[self::ORDER][] = array($val, $direction);
@@ -943,7 +945,7 @@ class Zend_Db_Select
943
$alias = $m[2];
944
}
945
// Check for columns that look like functions and convert to Zend_Db_Expr
946
- if (preg_match('/^([\w]*\(([^\)]|(?1))*\))#x2F;', (string) $col)) {
947
$col = new Zend_Db_Expr($col);
948
} elseif (preg_match('/(.+)\.(.+)/', $col, $m)) {
949
$currentCorrelationName = $m[1];
81
const SQL_ASC = 'ASC';
82
const SQL_DESC = 'DESC';
83
84
+ const REGEX_COLUMN_EXPR = '/^([\w]*\(([^\(\)]|(?1))*\))#x2F;';
85
+
86
/**
87
* Bind variables for query
88
*
511
}
512
513
foreach ($spec as $val) {
514
+ if (preg_match(self::REGEX_COLUMN_EXPR, (string) $val)) {
515
$val = new Zend_Db_Expr($val);
516
}
517
$this->_parts[self::GROUP][] = $val;
603
$val = trim($matches[1]);
604
$direction = $matches[2];
605
}
606
+ if (preg_match(self::REGEX_COLUMN_EXPR, (string) $val)) {
607
$val = new Zend_Db_Expr($val);
608
}
609
$this->_parts[self::ORDER][] = array($val, $direction);
945
$alias = $m[2];
946
}
947
// Check for columns that look like functions and convert to Zend_Db_Expr
948
+ if (preg_match(self::REGEX_COLUMN_EXPR, (string) $col)) {
949
$col = new Zend_Db_Expr($col);
950
} elseif (preg_match('/(.+)\.(.+)/', $col, $m)) {
951
$currentCorrelationName = $m[1];
lib/Zend/Dom/Query.php CHANGED
@@ -48,13 +48,14 @@ class Zend_Dom_Query
48
/**#@+
49
* Document types
50
*/
51
const DOC_XML = 'docXml';
52
const DOC_HTML = 'docHtml';
53
const DOC_XHTML = 'docXhtml';
54
/**#@-*/
55
56
/**
57
- * @var string
58
*/
59
protected $_document;
60
@@ -85,7 +86,7 @@ class Zend_Dom_Query
85
/**
86
* Constructor
87
*
88
- * @param null|string $document
89
* @param null|string $encoding
90
*/
91
public function __construct($document = null, $encoding = null)
@@ -119,12 +120,15 @@ class Zend_Dom_Query
119
/**
120
* Set document to query
121
*
122
- * @param string $document
123
* @param null|string $encoding Document encoding
124
* @return Zend_Dom_Query
125
*/
126
public function setDocument($document, $encoding = null)
127
{
128
if (0 === strlen($document)) {
129
return $this;
130
}
@@ -142,6 +146,22 @@ class Zend_Dom_Query
142
return $this->setDocumentHtml($document, $encoding);
143
}
144
145
/**
146
* Register HTML document
147
*
@@ -196,7 +216,7 @@ class Zend_Dom_Query
196
/**
197
* Retrieve current document
198
*
199
- * @return string
200
*/
201
public function getDocument()
202
{
@@ -259,6 +279,10 @@ class Zend_Dom_Query
259
}
260
$type = $this->getDocumentType();
261
switch ($type) {
262
case self::DOC_XML:
263
try {
264
$domDoc = Zend_Xml_Security::scan($document, $domDoc);
@@ -295,8 +319,7 @@ class Zend_Dom_Query
295
/**
296
* Register XPath namespaces
297
*
298
- * @param array $xpathNamespaces
299
- * @return void
300
*/
301
public function registerXpathNamespaces($xpathNamespaces)
302
{
48
/**#@+
49
* Document types
50
*/
51
+ const DOC_DOM = 'docDom';
52
const DOC_XML = 'docXml';
53
const DOC_HTML = 'docHtml';
54
const DOC_XHTML = 'docXhtml';
55
/**#@-*/
56
57
/**
58
+ * @var string|DOMDocument
59
*/
60
protected $_document;
61
86
/**
87
* Constructor
88
*
89
+ * @param null|string|DOMDocument $document
90
* @param null|string $encoding
91
*/
92
public function __construct($document = null, $encoding = null)
120
/**
121
* Set document to query
122
*
123
+ * @param string|DOMDocument $document
124
* @param null|string $encoding Document encoding
125
* @return Zend_Dom_Query
126
*/
127
public function setDocument($document, $encoding = null)
128
{
129
+ if ($document instanceof DOMDocument) {
130
+ return $this->setDocumentDom($document);
131
+ }
132
if (0 === strlen($document)) {
133
return $this;
134
}
146
return $this->setDocumentHtml($document, $encoding);
147
}
148
149
+ /**
150
+ * Set DOMDocument to query
151
+ *
152
+ * @param DOMDocument $document
153
+ * @return Zend_Dom_Query
154
+ */
155
+ public function setDocumentDom(DOMDocument $document)
156
+ {
157
+ $this->_document = $document;
158
+ $this->_docType = self::DOC_DOM;
159
+ if (null !== $document->encoding) {
160
+ $this->setEncoding($document->encoding);
161
+ }
162
+ return $this;
163
+ }
164
+
165
/**
166
* Register HTML document
167
*
216
/**
217
* Retrieve current document
218
*
219
+ * @return string|DOMDocument
220
*/
221
public function getDocument()
222
{
279
}
280
$type = $this->getDocumentType();
281
switch ($type) {
282
+ case self::DOC_DOM:
283
+ $domDoc = $this->_document;
284
+ $success = true;
285
+ break;
286
case self::DOC_XML:
287
try {
288
$domDoc = Zend_Xml_Security::scan($document, $domDoc);
319
/**
320
* Register XPath namespaces
321
*
322
+ * @param array $xpathNamespaces
323
*/
324
public function registerXpathNamespaces($xpathNamespaces)
325
{
lib/Zend/Form.php CHANGED
@@ -1295,7 +1295,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
1295
if (($belongsTo = $element->getBelongsTo()) !== $eBelongTo) {
1296
$check = $this->_dissolveArrayValue($defaults, $belongsTo);
1297
}
1298
- if (array_key_exists($name, $check)) {
1299
$this->setDefault($name, $check[$name]);
1300
$defaults = $this->_dissolveArrayUnsetKey($defaults, $belongsTo, $name);
1301
}
1295
if (($belongsTo = $element->getBelongsTo()) !== $eBelongTo) {
1296
$check = $this->_dissolveArrayValue($defaults, $belongsTo);
1297
}
1298
+ if (array_key_exists($name, (array)$check)) {
1299
$this->setDefault($name, $check[$name]);
1300
$defaults = $this->_dissolveArrayUnsetKey($defaults, $belongsTo, $name);
1301
}
lib/Zend/Http/Client.php CHANGED
@@ -39,6 +39,12 @@
39
#require_once 'Zend/Http/Client/Adapter/Interface.php';
40
41
42
/**
43
* @see Zend_Http_Response
44
*/
@@ -431,38 +437,40 @@ class Zend_Http_Client
431
foreach ($name as $k => $v) {
432
if (is_string($k)) {
433
$this->setHeaders($k, $v);
434
- } else {
435
- $this->setHeaders($v, null);
436
}
437
}
438
- } else {
439
- // Check if $name needs to be split
440
- if ($value === null && (strpos($name, ':') > 0)) {
441
- list($name, $value) = explode(':', $name, 2);
442
- }
443
444
- // Make sure the name is valid if we are in strict mode
445
- if ($this->config['strict'] && (! preg_match('/^[a-zA-Z0-9-]+#x2F;', $name))) {
446
- /** @see Zend_Http_Client_Exception */
447
- #require_once 'Zend/Http/Client/Exception.php';
448
- throw new Zend_Http_Client_Exception("{$name} is not a valid HTTP header name");
449
- }
450
451
- $normalized_name = strtolower($name);
452
453
- // If $value is null or false, unset the header
454
- if ($value === null || $value === false) {
455
- unset($this->headers[$normalized_name]);
456
457
- // Else, set the header
458
- } else {
459
- // Header names are stored lowercase internally.
460
- if (is_string($value)) {
461
- $value = trim($value);
462
- }
463
- $this->headers[$normalized_name] = array($name, $value);
464
- }
465
}
466
467
return $this;
468
}
@@ -1568,4 +1576,32 @@ class Zend_Http_Client
1568
return $parameters;
1569
}
1570
1571
}
39
#require_once 'Zend/Http/Client/Adapter/Interface.php';
40
41
42
+ /**
43
+ * @see Zend_Http_Header_HeaderValue
44
+ */
45
+ #require_once 'Zend/Http/Header/HeaderValue.php';
46
+
47
+
48
/**
49
* @see Zend_Http_Response
50
*/
437
foreach ($name as $k => $v) {
438
if (is_string($k)) {
439
$this->setHeaders($k, $v);
440
+ continue;
441
}
442
+ $this->setHeaders($v, null);
443
}
444
+ return $this;
445
+ }
446
447
+ // Check if $name needs to be split
448
+ if ($value === null && (strpos($name, ':') > 0)) {
449
+ list($name, $value) = explode(':', $name, 2);
450
+ }
451
452
+ // Make sure the name is valid if we are in strict mode
453
+ if ($this->config['strict'] && (! preg_match('/^[a-zA-Z0-9-]+#x2F;', $name))) {
454
+ #require_once 'Zend/Http/Client/Exception.php';
455
+ throw new Zend_Http_Client_Exception("{$name} is not a valid HTTP header name");
456
+ }
457
458
+ $normalized_name = strtolower($name);
459
460
+ // If $value is null or false, unset the header
461
+ if ($value === null || $value === false) {
462
+ unset($this->headers[$normalized_name]);
463
+ return $this;
464
+ }
465
+
466
+ // Validate value
467
+ $this->_validateHeaderValue($value);
468
+
469
+ // Header names are stored lowercase internally.
470
+ if (is_string($value)) {
471
+ $value = trim($value);
472
}
473
+ $this->headers[$normalized_name] = array($name, $value);
474
475
return $this;
476
}
1576
return $parameters;
1577
}
1578
1579
+ /**
1580
+ * Ensure a header value is valid per RFC 7230.
1581
+ *
1582
+ * @see http://tools.ietf.org/html/rfc7230#section-3.2
1583
+ * @param string|object|array $value
1584
+ * @param bool $recurse
1585
+ */
1586
+ protected function _validateHeaderValue($value, $recurse = true)
1587
+ {
1588
+ if (is_array($value) && $recurse) {
1589
+ foreach ($value as $v) {
1590
+ $this->_validateHeaderValue($v, false);
1591
+ }
1592
+ return;
1593
+ }
1594
+
1595
+ // Cast integers and floats to strings for purposes of header representation.
1596
+ if (is_int($value) || is_float($value)) {
1597
+ $value = (string) $value;
1598
+ }
1599
+
1600
+ if (! is_string($value) && (! is_object($value) || ! method_exists($value, '__toString'))) {
1601
+ #require_once 'Zend/Http/Exception.php';
1602
+ throw new Zend_Http_Exception('Invalid header value detected');
1603
+ }
1604
+
1605
+ Zend_Http_Header_HeaderValue::assertValid($value);
1606
+ }
1607
}
lib/Zend/Http/Client/Adapter/Curl.php CHANGED
@@ -221,17 +221,24 @@ class Zend_Http_Client_Adapter_Curl implements Zend_Http_Client_Adapter_Interfac
221
curl_setopt($this->_curl, CURLOPT_PORT, intval($port));
222
}
223
224
- // Set timeout
225
if (defined('CURLOPT_CONNECTTIMEOUT_MS')) {
226
- curl_setopt($this->_curl, CURLOPT_CONNECTTIMEOUT_MS, $this->_config['timeout'] * 1000);
227
- } else {
228
- curl_setopt($this->_curl, CURLOPT_CONNECTTIMEOUT, $this->_config['timeout']);
229
}
230
-
231
- if (defined('CURLOPT_TIMEOUT_MS')) {
232
- curl_setopt($this->_curl, CURLOPT_TIMEOUT_MS, $this->_config['timeout'] * 1000);
233
- } else {
234
- curl_setopt($this->_curl, CURLOPT_TIMEOUT, $this->_config['timeout']);
235
}
236
237
// Set Max redirects
221
curl_setopt($this->_curl, CURLOPT_PORT, intval($port));
222
}
223
224
+ // Set connection timeout
225
+ $connectTimeout = $this->_config['timeout'];
226
+ $constant = CURLOPT_CONNECTTIMEOUT;
227
if (defined('CURLOPT_CONNECTTIMEOUT_MS')) {
228
+ $connectTimeout *= 1000;
229
+ $constant = constant('CURLOPT_CONNECTTIMEOUT_MS');
230
}
231
+ curl_setopt($this->_curl, $constant, $connectTimeout);
232
+
233
+ // Set request timeout (once connection is established)
234
+ if (array_key_exists('request_timeout', $this->_config)) {
235
+ $requestTimeout = $this->_config['request_timeout'];
236
+ $constant = CURLOPT_TIMEOUT;
237
+ if (defined('CURLOPT_TIMEOUT_MS')) {
238
+ $requestTimeout *= 1000;
239
+ $constant = constant('CURLOPT_TIMEOUT_MS');
240
+ }
241
+ curl_setopt($this->_curl, $constant, $requestTimeout);
242
}
243
244
// Set Max redirects
lib/Zend/Http/Client/Adapter/Proxy.php CHANGED
@@ -244,7 +244,7 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
244
)
245
{
246
$request = "CONNECT $host:$port HTTP/$http_ver\r\n" .
247
- "Host: " . $this->config['proxy_host'] . "\r\n";
248
249
// Process provided headers, including important ones to CONNECT request
250
foreach ($headers as $k => $v) {
244
)
245
{
246
$request = "CONNECT $host:$port HTTP/$http_ver\r\n" .
247
+ "Host: " . $host . "\r\n";
248
249
// Process provided headers, including important ones to CONNECT request
250
foreach ($headers as $k => $v) {
lib/Zend/Http/Header/HeaderValue.php ADDED
@@ -0,0 +1,127 @@
1
+ <?php
2
+ /**
3
+ * Zend Framework
4
+ *
5
+ * LICENSE
6
+ *
7
+ * This source file is subject to the new BSD license that is bundled
8
+ * with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://framework.zend.com/license/new-bsd
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@zend.com so we can send you a copy immediately.
14
+ *
15
+ * @category Zend
16
+ * @package Zend_Http
17
+ * @subpackage Header
18
+ * @version $Id$
19
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
20
+ * @license http://framework.zend.com/license/new-bsd New BSD License
21
+ */
22
+
23
+
24
+ /**
25
+ * @category Zend
26
+ * @package Zend_Http
27
+ * @subpackage Header
28
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
29
+ * @license http://framework.zend.com/license/new-bsd New BSD License
30
+ */
31
+ final class Zend_Http_Header_HeaderValue
32
+ {
33
+ /**
34
+ * Private constructor; non-instantiable.
35
+ */
36
+ private function __construct()
37
+ {
38
+ }
39
+
40
+ /**
41
+ * Filter a header value
42
+ *
43
+ * Ensures CRLF header injection vectors are filtered.
44
+ *
45
+ * Per RFC 7230, only VISIBLE ASCII characters, spaces, and horizontal
46
+ * tabs are allowed in values; only one whitespace character is allowed
47
+ * between visible characters.
48
+ *
49
+ * @see http://en.wikipedia.org/wiki/HTTP_response_splitting
50
+ * @param string $value
51
+ * @return string
52
+ */
53
+ public static function filter($value)
54
+ {
55
+ $value = (string) $value;
56
+ $length = strlen($value);
57
+ $string = '';
58
+ for ($i = 0; $i < $length; $i += 1) {
59
+ $ascii = ord($value[$i]);
60
+
61
+ // Non-visible, non-whitespace characters
62
+ // 9 === horizontal tab
63
+ // 32-126, 128-254 === visible
64
+ // 127 === DEL
65
+ // 255 === null byte
66
+ if (($ascii < 32 && $ascii !== 9)
67
+ || $ascii === 127
68
+ || $ascii > 254
69
+ ) {
70
+ continue;
71
+ }
72
+
73
+ $string .= $value[$i];
74
+ }
75
+
76
+ return $string;
77
+ }
78
+
79
+ /**
80
+ * Validate a header value.
81
+ *
82
+ * Per RFC 7230, only VISIBLE ASCII characters, spaces, and horizontal
83
+ * tabs are allowed in values; only one whitespace character is allowed
84
+ * between visible characters.
85
+ *
86
+ * @see http://en.wikipedia.org/wiki/HTTP_response_splitting
87
+ * @param string $value
88
+ * @return bool
89
+ */
90
+ public static function isValid($value)
91
+ {
92
+ $value = (string) $value;
93
+ $length = strlen($value);
94
+ for ($i = 0; $i < $length; $i += 1) {
95
+ $ascii = ord($value[$i]);
96
+
97
+ // Non-visible, non-whitespace characters
98
+ // 9 === horizontal tab
99
+ // 32-126, 128-254 === visible
100
+ // 127 === DEL
101
+ // 255 === null byte
102
+ if (($ascii < 32 && $ascii !== 9)
103
+ || $ascii === 127
104
+ || $ascii > 254
105
+ ) {
106
+ return false;
107
+ }
108
+ }
109
+
110
+ return true;
111
+ }
112
+
113
+ /**
114
+ * Assert a header value is valid.
115
+ *
116
+ * @param string $value
117
+ * @throws Exception\RuntimeException for invalid values
118
+ * @return void
119
+ */
120
+ public static function assertValid($value)
121
+ {
122
+ if (! self::isValid($value)) {
123
+ #require_once 'Zend/Http/Header/Exception/InvalidArgumentException.php';
124
+ throw new Zend_Http_Header_Exception_InvalidArgumentException('Invalid header value');
125
+ }
126
+ }
127
+ }
lib/Zend/Http/Header/SetCookie.php CHANGED
@@ -31,6 +31,11 @@
31
*/
32
#require_once "Zend/Http/Header/Exception/RuntimeException.php";
33
34
/**
35
* Zend_Http_Client is an implementation of an HTTP client in PHP. The client
36
* supports basic features like sending different HTTP requests and handling
@@ -311,6 +316,7 @@ class Zend_Http_Header_SetCookie
311
*/
312
public function setValue($value)
313
{
314
$this->value = $value;
315
return $this;
316
}
@@ -405,6 +411,7 @@ class Zend_Http_Header_SetCookie
405
*/
406
public function setDomain($domain)
407
{
408
$this->domain = $domain;
409
return $this;
410
}
@@ -422,6 +429,7 @@ class Zend_Http_Header_SetCookie
422
*/
423
public function setPath($path)
424
{
425
$this->path = $path;
426
return $this;
427
}
31
*/
32
#require_once "Zend/Http/Header/Exception/RuntimeException.php";
33
34
+ /**
35
+ * @see Zend_Http_Header_HeaderValue
36
+ */
37
+ #require_once "Zend/Http/Header/HeaderValue.php";
38
+
39
/**
40
* Zend_Http_Client is an implementation of an HTTP client in PHP. The client
41
* supports basic features like sending different HTTP requests and handling
316
*/
317
public function setValue($value)
318
{
319
+ Zend_Http_Header_HeaderValue::assertValid($value);
320
$this->value = $value;
321
return $this;
322
}
411
*/
412
public function setDomain($domain)
413
{
414
+ Zend_Http_Header_HeaderValue::assertValid($domain);
415
$this->domain = $domain;
416
return $this;
417
}
429
*/
430
public function setPath($path)
431
{
432
+ Zend_Http_Header_HeaderValue::assertValid($path);
433
$this->path = $path;
434
return $this;
435
}
lib/Zend/Http/Response.php CHANGED
@@ -21,6 +21,11 @@
21
* @license http://framework.zend.com/license/new-bsd New BSD License
22
*/
23
24
/**
25
* Zend_Http_Response represents an HTTP 1.0 / 1.1 response message. It
26
* includes easy access to all the response's different elemts, as well as some
@@ -394,7 +399,7 @@ class Zend_Http_Response
394
* @param string $br Line breaks (eg. "\n", "\r\n", "<br />")
395
* @return string
396
*/
397
- public function asString($br = "\n")
398
{
399
return $this->getHeadersAsString(true, $br) . $br . $this->getRawBody();
400
}
@@ -496,44 +501,75 @@ class Zend_Http_Response
496
{
497
$headers = array();
498
499
- // First, split body and headers
500
- $parts = preg_split('|(?:\r?\n){2}|m', $response_str, 2);
501
- if (! $parts[0]) return $headers;
502
503
- // Split headers part to lines
504
- $lines = explode("\n", $parts[0]);
505
unset($parts);
506
$last_header = null;
507
508
- foreach($lines as $line) {
509
- $line = trim($line, "\r\n");
510
- if ($line == "") break;
511
512
// Locate headers like 'Location: ...' and 'Location:...' (note the missing space)
513
- if (preg_match("|^([\w-]+):\s*(.+)|", $line, $m)) {
514
unset($last_header);
515
- $h_name = strtolower($m[1]);
516
$h_value = $m[2];
517
518
if (isset($headers[$h_name])) {
519
if (! is_array($headers[$h_name])) {
520
$headers[$h_name] = array($headers[$h_name]);
521
}
522
523
- $headers[$h_name][] = $h_value;
524
- } else {
525
- $headers[$h_name] = $h_value;
526
}
527
$last_header = $h_name;
528
- } elseif (preg_match("|^\s+(.+)$|", $line, $m) && $last_header !== null) {
529
if (is_array($headers[$last_header])) {
530
end($headers[$last_header]);
531
$last_header_key = key($headers[$last_header]);
532
- $headers[$last_header][$last_header_key] .= $m[1];
533
- } else {
534
- $headers[$last_header] .= $m[1];
535
}
536
}
537
}
538
539
return $headers;
@@ -547,7 +583,7 @@ class Zend_Http_Response
547
*/
548
public static function extractBody($response_str)
549
{
550
- $parts = preg_split('|(?:\r?\n){2}|m', $response_str, 2);
551
if (isset($parts[1])) {
552
return $parts[1];
553
}
21
* @license http://framework.zend.com/license/new-bsd New BSD License
22
*/
23
24
+ /**
25
+ * @see Zend_Http_Header_HeaderValue
26
+ */
27
+ #require_once 'Zend/Http/Header/HeaderValue.php';
28
+
29
/**
30
* Zend_Http_Response represents an HTTP 1.0 / 1.1 response message. It
31
* includes easy access to all the response's different elemts, as well as some
399
* @param string $br Line breaks (eg. "\n", "\r\n", "<br />")
400
* @return string
401
*/
402
+ public function asString($br = "\r\n")
403
{
404
return $this->getHeadersAsString(true, $br) . $br . $this->getRawBody();
405
}
501
{
502
$headers = array();
503
504
+ // First, split body and headers. Headers are separated from the
505
+ // message at exactly the sequence "\r\n\r\n"
506
+ $parts = preg_split('|(?:\r\n){2}|m', $response_str, 2);
507
+ if (! $parts[0]) {
508
+ return $headers;
509
+ }
510
511
+ // Split headers part to lines; "\r\n" is the only valid line separator.
512
+ $lines = explode("\r\n", $parts[0]);
513
unset($parts);
514
$last_header = null;
515
516
+ foreach($lines as $index => $line) {
517
+ if ($index === 0 && preg_match('#^HTTP/\d+(?:\.\d+) [1-5]\d+#', $line)) {
518
+ // Status line; ignore
519
+ continue;
520
+ }
521
+
522
+ if ($line == "") {
523
+ // Done processing headers
524
+ break;
525
+ }
526
527
// Locate headers like 'Location: ...' and 'Location:...' (note the missing space)
528
+ if (preg_match("|^([a-zA-Z0-9\'`#$%&*+.^_\|\~!-]+):\s*(.*)|s", $line, $m)) {
529
unset($last_header);
530
+ $h_name = strtolower($m[1]);
531
$h_value = $m[2];
532
+ Zend_Http_Header_HeaderValue::assertValid($h_value);
533
534
if (isset($headers[$h_name])) {
535
if (! is_array($headers[$h_name])) {
536
$headers[$h_name] = array($headers[$h_name]);
537
}
538
539
+ $headers[$h_name][] = ltrim($h_value);
540
+ $last_header = $h_name;
541
+ continue;
542
}
543
+
544
+ $headers[$h_name] = ltrim($h_value);
545
$last_header = $h_name;
546
+ continue;
547
+ }
548
+
549
+ // Identify header continuations
550
+ if (preg_match("|^[ \t](.+)$|s", $line, $m) && $last_header !== null) {
551
+ $h_value = trim($m[1]);
552
if (is_array($headers[$last_header])) {
553
end($headers[$last_header]);
554
$last_header_key = key($headers[$last_header]);
555
+
556
+ $h_value = $headers[$last_header][$last_header_key] . $h_value;
557
+ Zend_Http_Header_HeaderValue::assertValid($h_value);
558
+
559
+ $headers[$last_header][$last_header_key] = $h_value;
560
+ continue;
561
}
562
+
563
+ $h_value = $headers[$last_header] . $h_value;
564
+ Zend_Http_Header_HeaderValue::assertValid($h_value);
565
+
566
+ $headers[$last_header] = $h_value;
567
+ continue;
568
}
569
+
570
+ // Anything else is an error condition
571
+ #require_once 'Zend/Http/Exception.php';
572
+ throw new Zend_Http_Exception('Invalid header line detected');
573
}
574
575
return $headers;
583
*/
584
public static function extractBody($response_str)
585
{
586
+ $parts = preg_split('|(?:\r\n){2}|m', $response_str, 2);
587
if (isset($parts[1])) {
588
return $parts[1];
589
}
lib/Zend/Http/UserAgent/AbstractDevice.php CHANGED
@@ -509,7 +509,9 @@ abstract class Zend_Http_UserAgent_AbstractDevice
509
}
510
$result['browser_version'] = '??';
511
}
512
- } elseif ($product == 'mozilla' && $result['browser_version'] < 5.0) {
513
// handles the real Mozilla (or old Netscape if version < 5.0)
514
$result['browser_name'] = 'Netscape';
515
}
509
}
510
$result['browser_version'] = '??';
511
}
512
+ } elseif ($product == 'mozilla' && isset($result['browser_version'])
513
+ && $result['browser_version'] < 5.0
514
+ ) {
515
// handles the real Mozilla (or old Netscape if version < 5.0)
516
$result['browser_name'] = 'Netscape';
517
}
lib/Zend/Loader/Autoloader.php CHANGED
@@ -21,7 +21,7 @@
21
*/
22
23
/** Zend_Loader */
24
- require_once 'Zend/Loader.php';
25
26
/**
27
* Autoloader stack and namespace autoloader
21
*/
22
23
/** Zend_Loader */
24
+ #require_once 'Zend/Loader.php';
25
26
/**
27
* Autoloader stack and namespace autoloader
lib/Zend/Log.php CHANGED
@@ -25,6 +25,17 @@
25
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
26
* @license http://framework.zend.com/license/new-bsd New BSD License
27
* @version $Id$
28
*/
29
class Zend_Log
30
{
@@ -104,7 +115,6 @@ class Zend_Log
104
* Class constructor. Create a new logger
105
*
106
* @param Zend_Log_Writer_Abstract|null $writer default writer
107
- * @return void
108
*/
109
public function __construct(Zend_Log_Writer_Abstract $writer = null)
110
{
@@ -173,7 +183,7 @@ class Zend_Log
173
/**
174
* Construct a writer object based on a configuration array
175
*
176
- * @param array $spec config array with writer spec
177
* @return Zend_Log_Writer_Abstract
178
* @throws Zend_Log_Exception
179
*/
@@ -351,6 +361,7 @@ class Zend_Log
351
*/
352
public function __destruct()
353
{
354
foreach($this->_writers as $writer) {
355
$writer->shutdown();
356
}
@@ -440,6 +451,7 @@ class Zend_Log
440
}
441
442
// abort if rejected by the global filters
443
foreach ($this->_filters as $filter) {
444
if (! $filter->accept($event)) {
445
return;
@@ -447,6 +459,7 @@ class Zend_Log
447
}
448
449
// send to each writer
450
foreach ($this->_writers as $writer) {
451
$writer->write($event);
452
}
@@ -455,8 +468,9 @@ class Zend_Log
455
/**
456
* Add a custom priority
457
*
458
- * @param string $name Name of priority
459
- * @param integer $priority Numeric priority
460
* @throws Zend_Log_Exception
461
*/
462
public function addPriority($name, $priority)
@@ -481,7 +495,7 @@ class Zend_Log
481
* must be accepted by all filters added with this method.
482
*
483
* @param int|Zend_Config|array|Zend_Log_Filter_Interface $filter
484
- * @return Zend_Log
485
* @throws Zend_Log_Exception
486
*/
487
public function addFilter($filter)
@@ -510,6 +524,7 @@ class Zend_Log
510
*
511
* @param mixed $writer Zend_Log_Writer_Abstract or Config array
512
* @return Zend_Log
513
*/
514
public function addWriter($writer)
515
{
25
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
26
* @license http://framework.zend.com/license/new-bsd New BSD License
27
* @version $Id$
28
+ *
29
+ * Convenience methods for log [@see Zend_Log::__call()]:
30
+ *
31
+ * @method emerg(string $message, $extras = null)
32
+ * @method alert(string $message, $extras = null)
33
+ * @method crit(string $message, $extras = null)
34
+ * @method err(string $message, $extras = null)
35
+ * @method warn(string $message, $extras = null)
36
+ * @method notice(string $message, $extras = null)
37
+ * @method info(string $message, $extras = null)
38
+ * @method debug(string $message, $extras = null)
39
*/
40
class Zend_Log
41
{
115
* Class constructor. Create a new logger
116
*
117
* @param Zend_Log_Writer_Abstract|null $writer default writer
118
*/
119
public function __construct(Zend_Log_Writer_Abstract $writer = null)
120
{
183
/**
184
* Construct a writer object based on a configuration array
185
*
186
+ * @param array $config config array with writer spec
187
* @return Zend_Log_Writer_Abstract
188
* @throws Zend_Log_Exception
189
*/
361
*/
362
public function __destruct()
363
{
364
+ /** @var Zend_Log_Writer_Abstract $writer */
365
foreach($this->_writers as $writer) {
366
$writer->shutdown();
367
}
451
}
452
453
// abort if rejected by the global filters
454
+ /** @var Zend_Log_Filter_Interface $filter */
455
foreach ($this->_filters as $filter) {
456
if (! $filter->accept($event)) {
457
return;
459
}
460
461
// send to each writer
462
+ /** @var Zend_Log_Writer_Abstract $writer */
463
foreach ($this->_writers as $writer) {
464
$writer->write($event);
465
}
468
/**
469
* Add a custom priority
470
*
471
+ * @param string $name Name of priority
472
+ * @param integer $priority Numeric priority
473
+ * @return $this
474
* @throws Zend_Log_Exception
475
*/
476
public function addPriority($name, $priority)
495
* must be accepted by all filters added with this method.
496
*
497
* @param int|Zend_Config|array|Zend_Log_Filter_Interface $filter
498
+ * @return $this
499
* @throws Zend_Log_Exception
500
*/
501
public function addFilter($filter)
524
*
525
* @param mixed $writer Zend_Log_Writer_Abstract or Config array
526
* @return Zend_Log
527
+ * @throws Zend_Log_Exception
528
*/
529
public function addWriter($writer)
530
{
lib/Zend/Mail/Header/HeaderName.php ADDED
@@ -0,0 +1,92 @@
1
+ <?php
2
+ /**
3
+ * Zend Framework
4
+ *
5
+ * LICENSE
6
+ *
7
+ * This source file is subject to the new BSD license that is bundled
8
+ * with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://framework.zend.com/license/new-bsd
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@zend.com so we can send you a copy immediately.
14
+ *
15
+ * @category Zend
16
+ * @package Zend_Mail
17
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
18
+ * @license http://framework.zend.com/license/new-bsd New BSD License
19
+ * @version $Id$
20
+ */
21
+
22
+
23
+ /**
24
+ * @category Zend
25
+ * @package Zend_Mail
26
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
27
+ * @license http://framework.zend.com/license/new-bsd New BSD License
28
+ */
29
+ final class Zend_Mail_Header_HeaderName
30
+ {
31
+ /**
32
+ * No public constructor.
33
+ */
34
+ private function __construct()
35
+ {
36
+ }
37
+
38
+ /**
39
+ * Filter the header name according to RFC 2822
40
+ *
41
+ * @see http://www.rfc-base.org/txt/rfc-2822.txt (section 2.2)
42
+ * @param string $name
43
+ * @return string
44
+ */
45
+ public static function filter($name)
46
+ {
47
+ $result = '';
48
+ $tot = strlen($name);
49
+ for ($i = 0; $i < $tot; $i += 1) {
50
+ $ord = ord($name[$i]);
51
+ if ($ord > 32 && $ord < 127 && $ord !== 58) {
52
+ $result .= $name[$i];
53
+ }
54
+ }
55
+ return $result;
56
+ }
57
+
58
+ /**
59
+ * Determine if the header name contains any invalid characters.
60
+ *
61
+ * @param string $name
62
+ * @return bool
63
+ */
64
+ public static function isValid($name)
65
+ {
66
+ $tot = strlen($name);
67
+ for ($i = 0; $i < $tot; $i += 1) {
68
+ $ord = ord($name[$i]);
69
+ if ($ord < 33 || $ord > 126 || $ord === 58) {
70
+ return false;
71
+ }
72
+ }
73
+ return true;
74
+ }
75
+
76
+ /**
77
+ * Assert that the header name is valid.
78
+ *
79
+ * Raises an exception if invalid.
80
+ *
81
+ * @param string $name
82
+ * @throws Exception\RuntimeException
83
+ * @return void
84
+ */
85
+ public static function assertValid($name)
86
+ {
87
+ if (! self::isValid($name)) {
88
+ #require_once 'Zend/Mail/Exception.php';
89
+ throw new Zend_Mail_Exception('Invalid header name detected');
90
+ }
91
+ }
92
+ }
lib/Zend/Mail/Header/HeaderValue.php ADDED
@@ -0,0 +1,136 @@
1
+ <?php
2
+ /**
3
+ * Zend Framework
4
+ *
5
+ * LICENSE
6
+ *
7
+ * This source file is subject to the new BSD license that is bundled
8
+ * with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://framework.zend.com/license/new-bsd
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@zend.com so we can send you a copy immediately.
14
+ *
15
+ * @category Zend
16
+ * @package Zend_Mail
17
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
18
+ * @license http://framework.zend.com/license/new-bsd New BSD License
19
+ * @version $Id$
20
+ */
21
+
22
+
23
+ /**
24
+ * @category Zend
25
+ * @package Zend_Mail
26
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
27
+ * @license http://framework.zend.com/license/new-bsd New BSD License
28
+ */
29
+ final class Zend_Mail_Header_HeaderValue
30
+ {
31
+ /**
32
+ * No public constructor.
33
+ */
34
+ private function __construct()
35
+ {
36
+ }
37
+
38
+ /**
39
+ * Filter the header value according to RFC 2822
40
+ *
41
+ * @see http://www.rfc-base.org/txt/rfc-2822.txt (section 2.2)
42
+ * @param string $value
43
+ * @return string
44
+ */
45
+ public static function filter($value)
46
+ {
47
+ $result = '';
48
+ $tot = strlen($value);
49
+
50
+ // Filter for CR and LF characters, leaving CRLF + WSP sequences for
51
+ // Long Header Fields (section 2.2.3 of RFC 2822)
52
+ for ($i = 0; $i < $tot; $i += 1) {
53
+ $ord = ord($value[$i]);
54
+ if (($ord < 32 || $ord > 126)
55
+ && $ord !== 13
56
+ ) {
57
+ continue;
58
+ }
59
+
60
+ if ($ord === 13) {
61
+ if ($i + 2 >= $tot) {
62
+ continue;
63
+ }
64
+
65
+ $lf = ord($value[$i + 1]);
66
+ $sp = ord($value[$i + 2]);
67
+
68
+ if ($lf !== 10 || $sp !== 32) {
69
+ continue;
70
+ }
71
+
72
+ $result .= "\r\n ";
73
+ $i += 2;
74
+ continue;
75
+ }
76
+
77
+ $result .= $value[$i];
78
+ }
79
+
80
+ return $result;
81
+ }
82
+
83
+ /**
84
+ * Determine if the header value contains any invalid characters.
85
+ *
86
+ * @see http://www.rfc-base.org/txt/rfc-2822.txt (section 2.2)
87
+ * @param string $value
88
+ * @return bool
89
+ */
90
+ public static function isValid($value)
91
+ {
92
+ $tot = strlen($value);
93
+ for ($i = 0; $i < $tot; $i += 1) {
94
+ $ord = ord($value[$i]);
95
+ if (($ord < 32 || $ord > 126)
96
+ && $ord !== 13
97
+ ) {
98
+ return false;
99
+ }
100
+
101
+ if ($ord === 13) {
102
+ if ($i + 2 >= $tot) {
103
+ return false;
104
+ }
105
+
106
+ $lf = ord($value[$i + 1]);
107
+ $sp = ord($value[$i + 2]);
108
+
109
+ if ($lf !== 10 || $sp !== 32) {
110
+ return false;
111
+ }
112
+
113
+ $i += 2;
114
+ }
115
+ }
116
+
117
+ return true;
118
+ }
119
+
120
+ /**
121
+ * Assert that the header value is valid.
122
+ *
123
+ * Raises an exception if invalid.
124
+ *
125
+ * @param string $value
126
+ * @throws Exception\RuntimeException
127
+ * @return void
128
+ */
129
+ public static function assertValid($value)
130
+ {
131
+ if (! self::isValid($value)) {
132
+ #require_once 'Zend/Mail/Exception.php';
133
+ throw new Zend_Mail_Exception('Invalid header value detected');
134
+ }
135
+ }
136
+ }
lib/Zend/Mail/Message.php CHANGED
@@ -69,6 +69,7 @@ class Zend_Mail_Message extends Zend_Mail_Part implements Zend_Mail_Message_Inte
69
} else {
70
$params['raw'] = stream_get_contents($params['file']);
71
}
72
}
73
74
if (!empty($params['flags'])) {
69
} else {
70
$params['raw'] = stream_get_contents($params['file']);
71
}
72
+ $params['raw'] = preg_replace("/(?<!\r)\n/", "\r\n", $params['raw']);
73
}
74
75
if (!empty($params['flags'])) {
lib/Zend/Mail/Part.php CHANGED
@@ -25,6 +25,16 @@
25
*/
26
#require_once 'Zend/Mime/Decode.php';
27
28
/**
29
* @see Zend_Mail_Part_Interface
30
*/
@@ -134,17 +144,19 @@ class Zend_Mail_Part implements RecursiveIterator, Zend_Mail_Part_Interface
134
}
135
136
if (isset($params['raw'])) {
137
- Zend_Mime_Decode::splitMessage($params['raw'], $this->_headers, $this->_content);
138
} else if (isset($params['headers'])) {
139
if (is_array($params['headers'])) {
140
$this->_headers = $params['headers'];
141
} else {
142
if (!empty($params['noToplines'])) {
143
- Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $null);
144
} else {
145
- Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $this->_topLines);
146
}
147
}
148
if (isset($params['content'])) {
149
$this->_content = $params['content'];
150
}
@@ -566,4 +578,26 @@ class Zend_Mail_Part implements RecursiveIterator, Zend_Mail_Part_Interface
566
$this->countParts();
567
$this->_iterationPos = 1;
568
}
569
}
25
*/
26
#require_once 'Zend/Mime/Decode.php';
27
28
+ /**
29
+ * @see Zend_Mail_Header_HeaderName
30
+ */
31
+ #require_once 'Zend/Mail/Header/HeaderName.php';
32
+
33
+ /**
34
+ * @see Zend_Mail_Header_HeaderValue
35
+ */
36
+ #require_once 'Zend/Mail/Header/HeaderValue.php';
37
+
38
/**
39
* @see Zend_Mail_Part_Interface
40
*/
144
}
145
146
if (isset($params['raw'])) {
147
+ Zend_Mime_Decode::splitMessage($params['raw'], $this->_headers, $this->_content, "\r\n");
148
} else if (isset($params['headers'])) {
149
if (is_array($params['headers'])) {
150
$this->_headers = $params['headers'];
151
+ $this->_validateHeaders($this->_headers);
152
} else {
153
if (!empty($params['noToplines'])) {
154
+ Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $null, "\r\n");
155
} else {
156
+ Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $this->_topLines, "\r\n");
157
}
158
}
159
+
160
if (isset($params['content'])) {
161
$this->_content = $params['content'];
162
}
578
$this->countParts();
579
$this->_iterationPos = 1;
580
}
581
+
582
+ /**
583
+ * Ensure headers do not contain invalid characters
584
+ *
585
+ * @param array $headers
586
+ * @param bool $assertNames
587
+ */
588
+ protected function _validateHeaders(array $headers, $assertNames = true)
589
+ {
590
+ foreach ($headers as $name => $value) {
591
+ if ($assertNames) {
592
+ Zend_Mail_Header_HeaderName::assertValid($name);
593
+ }
594
+
595
+ if (is_array($value)) {
596
+ $this->_validateHeaders($value, false);
597
+ continue;
598
+ }
599
+
600
+ Zend_Mail_Header_HeaderValue::assertValid($value);
601
+ }
602
+ }
603
}
lib/Zend/Mail/Storage.php CHANGED
@@ -31,6 +31,7 @@ class Zend_Mail_Storage
31
// system flags and other flags
32
const FLAG_PASSED = 'Passed';
33
const FLAG_SEEN = '\Seen';
34
const FLAG_ANSWERED = '\Answered';
35
const FLAG_FLAGGED = '\Flagged';
36
const FLAG_DELETED = '\Deleted';
31
// system flags and other flags
32
const FLAG_PASSED = 'Passed';
33
const FLAG_SEEN = '\Seen';
34
+ const FLAG_UNSEEN = '\Unseen';
35
const FLAG_ANSWERED = '\Answered';
36
const FLAG_FLAGGED = '\Flagged';
37
const FLAG_DELETED = '\Deleted';
lib/Zend/Mail/Storage/Imap.php CHANGED
@@ -88,6 +88,7 @@ class Zend_Mail_Storage_Imap extends Zend_Mail_Storage_Abstract
88
protected static $_knownFlags = array('\Passed' => Zend_Mail_Storage::FLAG_PASSED,
89
'\Answered' => Zend_Mail_Storage::FLAG_ANSWERED,
90
'\Seen' => Zend_Mail_Storage::FLAG_SEEN,
91
'\Deleted' => Zend_Mail_Storage::FLAG_DELETED,
92
'\Draft' => Zend_Mail_Storage::FLAG_DRAFT,
93
'\Flagged' => Zend_Mail_Storage::FLAG_FLAGGED);
@@ -99,6 +100,7 @@ class Zend_Mail_Storage_Imap extends Zend_Mail_Storage_Abstract
99
protected static $_searchFlags = array('\Recent' => 'RECENT',
100
'\Answered' => 'ANSWERED',
101
'\Seen' => 'SEEN',
102
'\Deleted' => 'DELETED',
103
'\Draft' => 'DRAFT',
104
'\Flagged' => 'FLAGGED');
88
protected static $_knownFlags = array('\Passed' => Zend_Mail_Storage::FLAG_PASSED,
89
'\Answered' => Zend_Mail_Storage::FLAG_ANSWERED,
90
'\Seen' => Zend_Mail_Storage::FLAG_SEEN,
91
+ '\Unseen' => Zend_Mail_Storage::FLAG_UNSEEN,
92
'\Deleted' => Zend_Mail_Storage::FLAG_DELETED,
93
'\Draft' => Zend_Mail_Storage::FLAG_DRAFT,
94
'\Flagged' => Zend_Mail_Storage::FLAG_FLAGGED);
100
protected static $_searchFlags = array('\Recent' => 'RECENT',
101
'\Answered' => 'ANSWERED',
102
'\Seen' => 'SEEN',
103
+ '\Unseen' => 'UNSEEN',
104
'\Deleted' => 'DELETED',
105
'\Draft' => 'DRAFT',
106
'\Flagged' => 'FLAGGED');
lib/Zend/Measure/Number.php CHANGED
@@ -415,6 +415,12 @@ class Zend_Measure_Number extends Zend_Measure_Abstract
415
public function convertTo($type, $round = 0, $locale = null)
416
{
417
$this->setType($type);
418
return $this->toString($round, $locale);
419
}
420
}
415
public function convertTo($type, $round = 0, $locale = null)
416
{
417
$this->setType($type);
418
+
419
+ // Roman numerals do not need a formatting
420
+ if ($this->getType() === self::ROMAN) {
421
+ return $this->_value;
422
+ }
423
+
424
return $this->toString($round, $locale);
425
}
426
}
lib/Zend/Registry.php CHANGED
@@ -136,7 +136,7 @@ class Zend_Registry extends ArrayObject
136
*
137
* @param string $index - get the value associated with $index
138
* @return mixed
139
- * @throws Zend_Exception if no entry is registerd for $index.
140
*/
141
public static function get($index)
142
{
136
*
137
* @param string $index - get the value associated with $index
138
* @return mixed
139
+ * @throws Zend_Exception if no entry is registered for $index.
140
*/
141
public static function get($index)
142
{
lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php CHANGED
@@ -90,8 +90,10 @@ class Zend_Search_Lucene_Storage_Directory_Filesystem extends Zend_Search_Lucene
90
* @return boolean
91
*/
92
93
- public static function mkdirs($dir, $mode = 0777, $recursive = true)
94
{
95
if (($dir === null) || $dir === '') {
96
return false;
97
}
@@ -360,4 +362,3 @@ class Zend_Search_Lucene_Storage_Directory_Filesystem extends Zend_Search_Lucene
360
return $this->_fileHandlers[$filename];
361
}
362
}
363
-
90
* @return boolean
91
*/
92
93
+ public static function mkdirs($dir, $mode = 0775, $recursive = true)
94
{
95
+ $mode = $mode & ~0002;
96
+
97
if (($dir === null) || $dir === '') {
98
return false;
99
}
362
return $this->_fileHandlers[$filename];
363
}
364
}
lib/Zend/Serializer/Adapter/PythonPickle.php CHANGED
@@ -99,11 +99,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt
99
const OP_BINBYTES = 'B'; // push bytes; counted binary string argument
100
const OP_SHORT_BINBYTES = 'C'; // " " ; " " " " < 256 bytes
101
102
- /**
103
- * @var bool Whether or not this is a PHP 6 binary
104
- */
105
- protected static $_isPhp6 = null;
106
-
107
/**
108
* @var bool Whether or not the system is little-endian
109
*/
@@ -155,9 +150,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt
155
if (self::$_isLittleEndian === null) {
156
self::$_isLittleEndian = (pack('l', 1) === "\x01\x00\x00\x00");
157
}
158
- if (self::$_isPhp6 === null) {
159
- self::$_isPhp6 = !version_compare(PHP_VERSION, '6.0.0', '<');
160
- }
161
162
$this->_marker = new stdClass();
163
}
@@ -1103,10 +1095,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt
1103
$pattern = '/\\\\u([a-fA-F0-9]{4})/u'; // \uXXXX
1104
$data = preg_replace_callback($pattern, array($this, '_convertMatchingUnicodeSequence2Utf8'), $data);
1105
1106
- if (self::$_isPhp6) {
1107
- $data = unicode_decode($data, 'UTF-8');
1108
- }
1109
-
1110
$this->_stack[] = $data;
1111
}
1112
@@ -1172,10 +1160,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt
1172
list(, $n) = unpack('l', $n);
1173
$data = $this->_read($n);
1174
1175
- if (self::$_isPhp6) {
1176
- $data = unicode_decode($data, 'UTF-8');
1177
- }
1178
-
1179
$this->_stack[] = $data;
1180
}
1181
99
const OP_BINBYTES = 'B'; // push bytes; counted binary string argument
100
const OP_SHORT_BINBYTES = 'C'; // " " ; " " " " < 256 bytes
101
102
/**
103
* @var bool Whether or not the system is little-endian
104
*/
150
if (self::$_isLittleEndian === null) {
151
self::$_isLittleEndian = (pack('l', 1) === "\x01\x00\x00\x00");
152
}
153
154
$this->_marker = new stdClass();
155
}
1095
$pattern = '/\\\\u([a-fA-F0-9]{4})/u'; // \uXXXX
1096
$data = preg_replace_callback($pattern, array($this, '_convertMatchingUnicodeSequence2Utf8'), $data);
1097
1098
$this->_stack[] = $data;
1099
}
1100
1160
list(, $n) = unpack('l', $n);
1161
$data = $this->_read($n);
1162
1163
$this->_stack[] = $data;
1164
}
1165
lib/Zend/Service/DeveloperGarden/BaseUserService.php DELETED
@@ -1,399 +0,0 @@
1
- <?php
2
- /**
3
- * Zend Framework
4
- *
5
- * LICENSE
6
- *
7
- * This source file is subject to the new BSD license that is bundled
8
- * with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://framework.zend.com/license/new-bsd
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@zend.com so we can send you a copy immediately.
14
- *
15
- * @category Zend
16
- * @package Zend_Service
17
- * @subpackage DeveloperGarden
18
- * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
19
- * @license http://framework.zend.com/license/new-bsd New BSD License
20
- * @version $Id$
21
- */
22
-
23
- /**
24
- * @see Zend_Service_DeveloperGarden_Client_ClientAbstract
25
- */
26
- #require_once 'Zend/Service/DeveloperGarden/Client/ClientAbstract.php';
27
-
28
- /**
29
- * @see Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse
30
- */
31
- #require_once 'Zend/Service/DeveloperGarden/Response/BaseUserService/GetQuotaInformationResponse.php';
32
-
33
- /**
34
- * @see Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse
35
- */
36
- #require_once 'Zend/Service/DeveloperGarden/Response/BaseUserService/ChangeQuotaPoolResponse.php';
37
-
38
- /**
39
- * @see Zend_Service_DeveloperGarden_Response_BaseUserService_GetAccountBalanceResponse
40
- */
41
- #require_once 'Zend/Service/DeveloperGarden/Response/BaseUserService/GetAccountBalanceResponse.php';
42
-
43
- /**
44
- * @see Zend_Service_DeveloperGarden_BaseUserService_AccountBalance
45
- */
46
- #require_once 'Zend/Service/DeveloperGarden/BaseUserService/AccountBalance.php';
47
-
48
- /**
49
- * @see Zend_Service_DeveloperGarden_Request_BaseUserService_GetQuotaInformation
50
- */
51
- #require_once 'Zend/Service/DeveloperGarden/Request/BaseUserService/GetQuotaInformation.php';
52
-
53
- /**
54
- * @see Zend_Service_DeveloperGarden_Request_BaseUserService_ChangeQuotaPool
55
- */
56
- #require_once 'Zend/Service/DeveloperGarden/Request/BaseUserService/ChangeQuotaPool.php';
57
-
58
- /**
59
- * @see Zend_Service_DeveloperGarden_Request_BaseUserService_GetAccountBalance
60
- */
61
- #require_once 'Zend/Service/DeveloperGarden/Request/BaseUserService/GetAccountBalance.php';
62
-
63
- /**
64
- * @category Zend
65
- * @package Zend_Service
66
- * @subpackage DeveloperGarden
67
- * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
68
- * @author Marco Kaiser
69
- * @license http://framework.zend.com/license/new-bsd New BSD License
70
- */
71
- class Zend_Service_DeveloperGarden_BaseUserService extends Zend_Service_DeveloperGarden_Client_ClientAbstract
72
- {
73
- /**
74
- * wsdl file
75
- *
76
- * @var string
77
- */
78
- protected $_wsdlFile = 'https://gateway.developer.telekom.com/p3gw-mod-odg-admin/services/ODGBaseUserService?wsdl';
79
-
80
- /**
81
- * wsdl file local
82
- *
83
- * @var string
84
- */
85
- protected $_wsdlFileLocal = 'Wsdl/ODGBaseUserService.wsdl';
86
-
87
- /**
88
- * Response, Request Classmapping
89
- *
90
- * @var array
91
- *
92
- */
93
- protected $_classMap = array(
94
- 'getQuotaInformationResponse' =>
95
- 'Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse',
96
- 'changeQuotaPoolResponse' =>
97
- 'Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse',
98
- 'getAccountBalanceResponse' =>
99
- 'Zend_Service_DeveloperGarden_Response_BaseUserService_GetAccountBalanceResponse',
100
- 'AccountBalance' =>
101
- 'Zend_Service_DeveloperGarden_BaseUserService_AccountBalance',
102
- );
103
-
104
- /**
105
- * array with all QuotaModuleIds
106
- *
107
- * @var array
108
- */
109
- protected $_moduleIds = array(
110
- 'SmsProduction' => 'SmsProduction',
111
- 'SmsSandbox' => 'SmsSandbox',
112
- 'VoiceCallProduction' => 'VoiceButlerProduction',
113
- 'VoiceCallSandbox' => 'VoiceButlerSandbox',
114
- 'ConferenceCallProduction' => 'CCSProduction',
115
- 'ConferenceCallSandbox' => 'CCSSandbox',
116
- 'LocalSearchProduction' => 'localsearchProduction',
117
- 'LocalSearchSandbox' => 'localsearchSandbox',
118
- 'IPLocationProduction' => 'IPLocationProduction',
119
- 'IPLocationSandbox' => 'IPLocationSandbox'
120
- );
121
-
122
- /**
123
- * returns an array with all possible ModuleIDs
124
- *
125
- * @return array
126
- */
127
- public function getModuleIds()
128
- {
129
- return $this->_moduleIds;
130
- }
131
-
132
- /**
133
- * checks the moduleId and throws exception if not valid
134
- *
135
- * @param string $moduleId
136
- * @throws Zend_Service_DeveloperGarden_Client_Exception
137
- * @return void
138
- */
139
- protected function _checkModuleId($moduleId)
140
- {
141
- if (!in_array($moduleId, $this->_moduleIds)) {
142
- #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php';
143
- throw new Zend_Service_DeveloperGarden_Client_Exception('moduleId not valid');
144
- }
145
- }
146
-
147
- /**
148
- * returns the correct module string
149
- *
150
- * @param string $module
151
- * @param integer $environment
152
- * @return string
153
- */
154
- protected function _buildModuleString($module, $environment)
155
- {
156
- $moduleString = $module;
157
- switch($environment) {
158
- case self::ENV_PRODUCTION :
159
- $moduleString .= 'Production';
160
- break;
161
- case self::ENV_SANDBOX :
162
- $moduleString .= 'Sandbox';
163
- break;
164
- default:
165
- #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php';
166
- throw new Zend_Service_DeveloperGarden_Client_Exception(
167
- 'Not a valid environment supplied.'
168
- );
169
- }
170
-
171
- if (!in_array($moduleString, $this->_moduleIds)) {
172
- #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php';
173
- throw new Zend_Service_DeveloperGarden_Client_Exception(
174
- 'Not a valid module name supplied.'
175
- );
176
- }
177
-
178
- return $moduleString;
179
- }
180
-
181
- /**
182
- * returns the request object with the specific moduleId
183
- *
184
- * @param string $moduleId
185
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse
186
- */
187
- protected function _getRequestModule($moduleId)
188
- {
189
- return new Zend_Service_DeveloperGarden_Request_BaseUserService_GetQuotaInformation(
190
- $moduleId
191
- );
192
- }
193
-
194
- /**
195
- * returns the request object with the specific moduleId and new quotaMax value
196
- *
197
- * @param string $moduleId
198
- * @param integer $quotaMax
199
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse
200
- */
201
- protected function _getChangeRequestModule($moduleId, $quotaMax)
202
- {
203
- return new Zend_Service_DeveloperGarden_Request_BaseUserService_ChangeQuotaPool(
204
- $moduleId,
205
- $quotaMax
206
- );
207
- }
208
-
209
- /**
210
- * returns the Quota Information for SMS Service
211
- *
212
- * @param int $environment
213
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse
214
- */
215
- public function getSmsQuotaInformation($environment = self::ENV_PRODUCTION)
216
- {
217
- self::checkEnvironment($environment);
218
- $moduleId = $this->_buildModuleString('Sms', $environment);
219
- $request = $this->_getRequestModule($moduleId);
220
- return $this->getQuotaInformation($request);
221
- }
222
-
223
- /**
224
- * returns the Quota Information for VoiceCall Service
225
- *
226
- * @param int $environment
227
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse
228
- */
229
- public function getVoiceCallQuotaInformation($environment = self::ENV_PRODUCTION)
230
- {
231
- self::checkEnvironment($environment);
232
- $moduleId = $this->_buildModuleString('VoiceButler', $environment);
233
- $request = $this->_getRequestModule($moduleId);
234
- return $this->getQuotaInformation($request);
235
- }
236
-
237
- /**
238
- * returns the Quota Information for SMS ConferenceCall
239
- *
240
- * @param int $environment
241
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse
242
- */
243
- public function getConfernceCallQuotaInformation($environment = self::ENV_PRODUCTION)
244
- {
245
- self::checkEnvironment($environment);
246
- $moduleId = $this->_buildModuleString('CCS', $environment);
247
- $request = $this->_getRequestModule($moduleId);
248
- return $this->getQuotaInformation($request);
249
- }
250
-
251
- /**
252
- * returns the Quota Information for LocaleSearch Service
253
- *
254
- * @param int $environment
255
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse
256
- */
257
- public function getLocalSearchQuotaInformation($environment = self::ENV_PRODUCTION)
258
- {
259
- self::checkEnvironment($environment);
260
- $moduleId = $this->_buildModuleString('localsearch', $environment);
261
- $request = $this->_getRequestModule($moduleId);
262
- return $this->getQuotaInformation($request);
263
- }
264
-
265
- /**
266
- * returns the Quota Information for IPLocation Service
267
- *
268
- * @param int $environment
269
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse
270
- */
271
- public function getIPLocationQuotaInformation($environment = self::ENV_PRODUCTION)
272
- {
273
- self::checkEnvironment($environment);
274
- $moduleId = $this->_buildModuleString('IPLocation', $environment);
275
- $request = $this->_getRequestModule($moduleId);
276
- return $this->getQuotaInformation($request);
277
- }
278
-
279
- /**
280
- * returns the quota information
281
- *
282
- * @param Zend_Service_DeveloperGarden_Request_BaseUserService $request
283
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse
284
- */
285
- public function getQuotaInformation(
286
- Zend_Service_DeveloperGarden_Request_BaseUserService_GetQuotaInformation $request
287
- ) {
288
- $this->_checkModuleId($request->getModuleId());
289
- return $this->getSoapClient()
290
- ->getQuotaInformation($request)
291
- ->parse();
292
- }
293
-
294
- /**
295
- * sets new user quota for the sms service
296
- *
297
- * @param integer $quotaMax
298
- * @param integer $environment
299
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse
300
- */
301
- public function changeSmsQuotaPool($quotaMax = 0, $environment = self::ENV_PRODUCTION)
302
- {
303
- self::checkEnvironment($environment);
304
- $moduleId = $this->_buildModuleString('Sms', $environment);
305
- $request = $this->_getChangeRequestModule($moduleId, $quotaMax);
306
- return $this->changeQuotaPool($request);
307
- }
308
-
309
- /**
310
- * sets new user quota for the voice call service
311
- *
312
- * @param integer $quotaMax
313
- * @param integer $environment
314
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse
315
- */
316
- public function changeVoiceCallQuotaPool($quotaMax = 0, $environment = self::ENV_PRODUCTION)
317
- {
318
- self::checkEnvironment($environment);
319
- $moduleId = $this->_buildModuleString('VoiceButler', $environment);
320
- $request = $this->_getChangeRequestModule($moduleId, $quotaMax);
321
- return $this->changeQuotaPool($request);
322
- }
323
-
324
- /**
325
- * sets new user quota for the IPLocation service
326
- *
327
- * @param integer $quotaMax
328
- * @param integer $environment
329
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse
330
- */
331
- public function changeIPLocationQuotaPool($quotaMax = 0, $environment = self::ENV_PRODUCTION)
332
- {
333
- self::checkEnvironment($environment);
334
- $moduleId = $this->_buildModuleString('IPLocation', $environment);
335
- $request = $this->_getChangeRequestModule($moduleId, $quotaMax);
336
- return $this->changeQuotaPool($request);
337
- }
338
-
339
- /**
340
- * sets new user quota for the Conference Call service
341
- *
342
- * @param integer $quotaMax
343
- * @param integer $environment
344
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse
345
- */
346
- public function changeConferenceCallQuotaPool($quotaMax = 0, $environment = self::ENV_PRODUCTION)
347
- {
348
- self::checkEnvironment($environment);
349
- $moduleId = $this->_buildModuleString('CCS', $environment);
350
- $request = $this->_getChangeRequestModule($moduleId, $quotaMax);
351
- return $this->changeQuotaPool($request);
352
- }
353
-
354
- /**
355
- * sets new user quota for the Local Search service
356
- *
357
- * @param integer $quotaMax
358
- * @param integer $environment
359
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse
360
- */
361
- public function changeLocalSearchQuotaPool($quotaMax = 0, $environment = self::ENV_PRODUCTION)
362
- {
363
- self::checkEnvironment($environment);
364
- $moduleId = $this->_buildModuleString('localsearch', $environment);
365
- $request = $this->_getChangeRequestModule($moduleId, $quotaMax);
366
- return $this->changeQuotaPool($request);
367
- }
368
-
369
- /**
370
- * set new quota values for the defined module
371
- *
372
- * @param Zend_Service_DeveloperGarden_Request_BaseUserService_ChangeQuotaPool $request
373
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_ChangeQuotaPoolResponse
374
- */
375
- public function changeQuotaPool(
376
- Zend_Service_DeveloperGarden_Request_BaseUserService_ChangeQuotaPool $request
377
- ) {
378
- $this->_checkModuleId($request->getModuleId());
379
- return $this->getSoapClient()
380
- ->changeQuotaPool($request)
381
- ->parse();
382
- }
383
-
384
- /**
385
- * get the result for a list of accounts
386
- *
387
- * @param array $accounts
388
- * @return Zend_Service_DeveloperGarden_Response_BaseUserService_GetAccountBalanceResponse
389
- */
390
- public function getAccountBalance(array $accounts = array())
391
- {
392
- $request = new Zend_Service_DeveloperGarden_Request_BaseUserService_GetAccountBalance(
393
- $accounts
394
- );
395
- return $this->getSoapClient()
396
- ->getAccountBalance($request)
397
- ->parse();
398
- }
399
- }