@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | /** |
| 380 | 380 | * Creates a group item. (groupItems.insert) |
| 381 | 381 | * |
| 382 | - * @param Google_GroupItem $postBody |
|
| 382 | + * @param Google_Service_YouTubeAnalytics_GroupItem $postBody |
|
| 383 | 383 | * @param array $optParams Optional parameters. |
| 384 | 384 | * |
| 385 | 385 | * @opt_param string onBehalfOfContentOwner Note: This parameter is intended |
@@ -474,7 +474,7 @@ discard block |
||
| 474 | 474 | /** |
| 475 | 475 | * Creates a group. (groups.insert) |
| 476 | 476 | * |
| 477 | - * @param Google_Group $postBody |
|
| 477 | + * @param Google_Service_YouTubeAnalytics_Group $postBody |
|
| 478 | 478 | * @param array $optParams Optional parameters. |
| 479 | 479 | * |
| 480 | 480 | * @opt_param string onBehalfOfContentOwner Note: This parameter is intended |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | * Modifies a group. For example, you could change a group's title. |
| 536 | 536 | * (groups.update) |
| 537 | 537 | * |
| 538 | - * @param Google_Group $postBody |
|
| 538 | + * @param Google_Service_YouTubeAnalytics_Group $postBody |
|
| 539 | 539 | * @param array $optParams Optional parameters. |
| 540 | 540 | * |
| 541 | 541 | * @opt_param string onBehalfOfContentOwner Note: This parameter is intended |
@@ -32,19 +32,19 @@ discard block |
||
| 32 | 32 | { |
| 33 | 33 | /** Manage your YouTube account. */ |
| 34 | 34 | const YOUTUBE = |
| 35 | - "https://www.googleapis.com/auth/youtube"; |
|
| 35 | + "https://www.googleapis.com/auth/youtube"; |
|
| 36 | 36 | /** View your YouTube account. */ |
| 37 | 37 | const YOUTUBE_READONLY = |
| 38 | - "https://www.googleapis.com/auth/youtube.readonly"; |
|
| 38 | + "https://www.googleapis.com/auth/youtube.readonly"; |
|
| 39 | 39 | /** View and manage your assets and associated content on YouTube. */ |
| 40 | 40 | const YOUTUBEPARTNER = |
| 41 | - "https://www.googleapis.com/auth/youtubepartner"; |
|
| 41 | + "https://www.googleapis.com/auth/youtubepartner"; |
|
| 42 | 42 | /** View YouTube Analytics monetary reports for your YouTube content. */ |
| 43 | 43 | const YT_ANALYTICS_MONETARY_READONLY = |
| 44 | - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly"; |
|
| 44 | + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly"; |
|
| 45 | 45 | /** View YouTube Analytics reports for your YouTube content. */ |
| 46 | 46 | const YT_ANALYTICS_READONLY = |
| 47 | - "https://www.googleapis.com/auth/yt-analytics.readonly"; |
|
| 47 | + "https://www.googleapis.com/auth/yt-analytics.readonly"; |
|
| 48 | 48 | |
| 49 | 49 | public $batchReportDefinitions; |
| 50 | 50 | public $batchReports; |
@@ -60,222 +60,222 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function __construct(Google_Client $client) |
| 62 | 62 | { |
| 63 | - parent::__construct($client); |
|
| 64 | - $this->rootUrl = 'https://www.googleapis.com/'; |
|
| 65 | - $this->servicePath = 'youtube/analytics/v1/'; |
|
| 66 | - $this->version = 'v1'; |
|
| 67 | - $this->serviceName = 'youtubeAnalytics'; |
|
| 68 | - |
|
| 69 | - $this->batchReportDefinitions = new Google_Service_YouTubeAnalytics_BatchReportDefinitions_Resource( |
|
| 70 | - $this, |
|
| 71 | - $this->serviceName, |
|
| 72 | - 'batchReportDefinitions', |
|
| 73 | - array( |
|
| 74 | - 'methods' => array( |
|
| 75 | - 'list' => array( |
|
| 76 | - 'path' => 'batchReportDefinitions', |
|
| 77 | - 'httpMethod' => 'GET', |
|
| 78 | - 'parameters' => array( |
|
| 79 | - 'onBehalfOfContentOwner' => array( |
|
| 80 | - 'location' => 'query', |
|
| 81 | - 'type' => 'string', |
|
| 82 | - 'required' => true, |
|
| 83 | - ), |
|
| 84 | - ), |
|
| 85 | - ), |
|
| 86 | - ) |
|
| 87 | - ) |
|
| 88 | - ); |
|
| 89 | - $this->batchReports = new Google_Service_YouTubeAnalytics_BatchReports_Resource( |
|
| 90 | - $this, |
|
| 91 | - $this->serviceName, |
|
| 92 | - 'batchReports', |
|
| 93 | - array( |
|
| 94 | - 'methods' => array( |
|
| 95 | - 'list' => array( |
|
| 96 | - 'path' => 'batchReports', |
|
| 97 | - 'httpMethod' => 'GET', |
|
| 98 | - 'parameters' => array( |
|
| 99 | - 'batchReportDefinitionId' => array( |
|
| 100 | - 'location' => 'query', |
|
| 101 | - 'type' => 'string', |
|
| 102 | - 'required' => true, |
|
| 103 | - ), |
|
| 104 | - 'onBehalfOfContentOwner' => array( |
|
| 105 | - 'location' => 'query', |
|
| 106 | - 'type' => 'string', |
|
| 107 | - 'required' => true, |
|
| 108 | - ), |
|
| 109 | - ), |
|
| 110 | - ), |
|
| 111 | - ) |
|
| 112 | - ) |
|
| 113 | - ); |
|
| 114 | - $this->groupItems = new Google_Service_YouTubeAnalytics_GroupItems_Resource( |
|
| 115 | - $this, |
|
| 116 | - $this->serviceName, |
|
| 117 | - 'groupItems', |
|
| 118 | - array( |
|
| 119 | - 'methods' => array( |
|
| 120 | - 'delete' => array( |
|
| 121 | - 'path' => 'groupItems', |
|
| 122 | - 'httpMethod' => 'DELETE', |
|
| 123 | - 'parameters' => array( |
|
| 124 | - 'id' => array( |
|
| 125 | - 'location' => 'query', |
|
| 126 | - 'type' => 'string', |
|
| 127 | - 'required' => true, |
|
| 128 | - ), |
|
| 129 | - 'onBehalfOfContentOwner' => array( |
|
| 130 | - 'location' => 'query', |
|
| 131 | - 'type' => 'string', |
|
| 132 | - ), |
|
| 133 | - ), |
|
| 134 | - ),'insert' => array( |
|
| 135 | - 'path' => 'groupItems', |
|
| 136 | - 'httpMethod' => 'POST', |
|
| 137 | - 'parameters' => array( |
|
| 138 | - 'onBehalfOfContentOwner' => array( |
|
| 139 | - 'location' => 'query', |
|
| 140 | - 'type' => 'string', |
|
| 141 | - ), |
|
| 142 | - ), |
|
| 143 | - ),'list' => array( |
|
| 144 | - 'path' => 'groupItems', |
|
| 145 | - 'httpMethod' => 'GET', |
|
| 146 | - 'parameters' => array( |
|
| 147 | - 'groupId' => array( |
|
| 148 | - 'location' => 'query', |
|
| 149 | - 'type' => 'string', |
|
| 150 | - 'required' => true, |
|
| 151 | - ), |
|
| 152 | - 'onBehalfOfContentOwner' => array( |
|
| 153 | - 'location' => 'query', |
|
| 154 | - 'type' => 'string', |
|
| 155 | - ), |
|
| 156 | - ), |
|
| 157 | - ), |
|
| 158 | - ) |
|
| 159 | - ) |
|
| 160 | - ); |
|
| 161 | - $this->groups = new Google_Service_YouTubeAnalytics_Groups_Resource( |
|
| 162 | - $this, |
|
| 163 | - $this->serviceName, |
|
| 164 | - 'groups', |
|
| 165 | - array( |
|
| 166 | - 'methods' => array( |
|
| 167 | - 'delete' => array( |
|
| 168 | - 'path' => 'groups', |
|
| 169 | - 'httpMethod' => 'DELETE', |
|
| 170 | - 'parameters' => array( |
|
| 171 | - 'id' => array( |
|
| 172 | - 'location' => 'query', |
|
| 173 | - 'type' => 'string', |
|
| 174 | - 'required' => true, |
|
| 175 | - ), |
|
| 176 | - 'onBehalfOfContentOwner' => array( |
|
| 177 | - 'location' => 'query', |
|
| 178 | - 'type' => 'string', |
|
| 179 | - ), |
|
| 180 | - ), |
|
| 181 | - ),'insert' => array( |
|
| 182 | - 'path' => 'groups', |
|
| 183 | - 'httpMethod' => 'POST', |
|
| 184 | - 'parameters' => array( |
|
| 185 | - 'onBehalfOfContentOwner' => array( |
|
| 186 | - 'location' => 'query', |
|
| 187 | - 'type' => 'string', |
|
| 188 | - ), |
|
| 189 | - ), |
|
| 190 | - ),'list' => array( |
|
| 191 | - 'path' => 'groups', |
|
| 192 | - 'httpMethod' => 'GET', |
|
| 193 | - 'parameters' => array( |
|
| 194 | - 'onBehalfOfContentOwner' => array( |
|
| 195 | - 'location' => 'query', |
|
| 196 | - 'type' => 'string', |
|
| 197 | - ), |
|
| 198 | - 'id' => array( |
|
| 199 | - 'location' => 'query', |
|
| 200 | - 'type' => 'string', |
|
| 201 | - ), |
|
| 202 | - 'mine' => array( |
|
| 203 | - 'location' => 'query', |
|
| 204 | - 'type' => 'boolean', |
|
| 205 | - ), |
|
| 206 | - ), |
|
| 207 | - ),'update' => array( |
|
| 208 | - 'path' => 'groups', |
|
| 209 | - 'httpMethod' => 'PUT', |
|
| 210 | - 'parameters' => array( |
|
| 211 | - 'onBehalfOfContentOwner' => array( |
|
| 212 | - 'location' => 'query', |
|
| 213 | - 'type' => 'string', |
|
| 214 | - ), |
|
| 215 | - ), |
|
| 216 | - ), |
|
| 217 | - ) |
|
| 218 | - ) |
|
| 219 | - ); |
|
| 220 | - $this->reports = new Google_Service_YouTubeAnalytics_Reports_Resource( |
|
| 221 | - $this, |
|
| 222 | - $this->serviceName, |
|
| 223 | - 'reports', |
|
| 224 | - array( |
|
| 225 | - 'methods' => array( |
|
| 226 | - 'query' => array( |
|
| 227 | - 'path' => 'reports', |
|
| 228 | - 'httpMethod' => 'GET', |
|
| 229 | - 'parameters' => array( |
|
| 230 | - 'ids' => array( |
|
| 231 | - 'location' => 'query', |
|
| 232 | - 'type' => 'string', |
|
| 233 | - 'required' => true, |
|
| 234 | - ), |
|
| 235 | - 'start-date' => array( |
|
| 236 | - 'location' => 'query', |
|
| 237 | - 'type' => 'string', |
|
| 238 | - 'required' => true, |
|
| 239 | - ), |
|
| 240 | - 'end-date' => array( |
|
| 241 | - 'location' => 'query', |
|
| 242 | - 'type' => 'string', |
|
| 243 | - 'required' => true, |
|
| 244 | - ), |
|
| 245 | - 'metrics' => array( |
|
| 246 | - 'location' => 'query', |
|
| 247 | - 'type' => 'string', |
|
| 248 | - 'required' => true, |
|
| 249 | - ), |
|
| 250 | - 'max-results' => array( |
|
| 251 | - 'location' => 'query', |
|
| 252 | - 'type' => 'integer', |
|
| 253 | - ), |
|
| 254 | - 'sort' => array( |
|
| 255 | - 'location' => 'query', |
|
| 256 | - 'type' => 'string', |
|
| 257 | - ), |
|
| 258 | - 'dimensions' => array( |
|
| 259 | - 'location' => 'query', |
|
| 260 | - 'type' => 'string', |
|
| 261 | - ), |
|
| 262 | - 'start-index' => array( |
|
| 263 | - 'location' => 'query', |
|
| 264 | - 'type' => 'integer', |
|
| 265 | - ), |
|
| 266 | - 'currency' => array( |
|
| 267 | - 'location' => 'query', |
|
| 268 | - 'type' => 'string', |
|
| 269 | - ), |
|
| 270 | - 'filters' => array( |
|
| 271 | - 'location' => 'query', |
|
| 272 | - 'type' => 'string', |
|
| 273 | - ), |
|
| 274 | - ), |
|
| 275 | - ), |
|
| 276 | - ) |
|
| 277 | - ) |
|
| 278 | - ); |
|
| 63 | + parent::__construct($client); |
|
| 64 | + $this->rootUrl = 'https://www.googleapis.com/'; |
|
| 65 | + $this->servicePath = 'youtube/analytics/v1/'; |
|
| 66 | + $this->version = 'v1'; |
|
| 67 | + $this->serviceName = 'youtubeAnalytics'; |
|
| 68 | + |
|
| 69 | + $this->batchReportDefinitions = new Google_Service_YouTubeAnalytics_BatchReportDefinitions_Resource( |
|
| 70 | + $this, |
|
| 71 | + $this->serviceName, |
|
| 72 | + 'batchReportDefinitions', |
|
| 73 | + array( |
|
| 74 | + 'methods' => array( |
|
| 75 | + 'list' => array( |
|
| 76 | + 'path' => 'batchReportDefinitions', |
|
| 77 | + 'httpMethod' => 'GET', |
|
| 78 | + 'parameters' => array( |
|
| 79 | + 'onBehalfOfContentOwner' => array( |
|
| 80 | + 'location' => 'query', |
|
| 81 | + 'type' => 'string', |
|
| 82 | + 'required' => true, |
|
| 83 | + ), |
|
| 84 | + ), |
|
| 85 | + ), |
|
| 86 | + ) |
|
| 87 | + ) |
|
| 88 | + ); |
|
| 89 | + $this->batchReports = new Google_Service_YouTubeAnalytics_BatchReports_Resource( |
|
| 90 | + $this, |
|
| 91 | + $this->serviceName, |
|
| 92 | + 'batchReports', |
|
| 93 | + array( |
|
| 94 | + 'methods' => array( |
|
| 95 | + 'list' => array( |
|
| 96 | + 'path' => 'batchReports', |
|
| 97 | + 'httpMethod' => 'GET', |
|
| 98 | + 'parameters' => array( |
|
| 99 | + 'batchReportDefinitionId' => array( |
|
| 100 | + 'location' => 'query', |
|
| 101 | + 'type' => 'string', |
|
| 102 | + 'required' => true, |
|
| 103 | + ), |
|
| 104 | + 'onBehalfOfContentOwner' => array( |
|
| 105 | + 'location' => 'query', |
|
| 106 | + 'type' => 'string', |
|
| 107 | + 'required' => true, |
|
| 108 | + ), |
|
| 109 | + ), |
|
| 110 | + ), |
|
| 111 | + ) |
|
| 112 | + ) |
|
| 113 | + ); |
|
| 114 | + $this->groupItems = new Google_Service_YouTubeAnalytics_GroupItems_Resource( |
|
| 115 | + $this, |
|
| 116 | + $this->serviceName, |
|
| 117 | + 'groupItems', |
|
| 118 | + array( |
|
| 119 | + 'methods' => array( |
|
| 120 | + 'delete' => array( |
|
| 121 | + 'path' => 'groupItems', |
|
| 122 | + 'httpMethod' => 'DELETE', |
|
| 123 | + 'parameters' => array( |
|
| 124 | + 'id' => array( |
|
| 125 | + 'location' => 'query', |
|
| 126 | + 'type' => 'string', |
|
| 127 | + 'required' => true, |
|
| 128 | + ), |
|
| 129 | + 'onBehalfOfContentOwner' => array( |
|
| 130 | + 'location' => 'query', |
|
| 131 | + 'type' => 'string', |
|
| 132 | + ), |
|
| 133 | + ), |
|
| 134 | + ),'insert' => array( |
|
| 135 | + 'path' => 'groupItems', |
|
| 136 | + 'httpMethod' => 'POST', |
|
| 137 | + 'parameters' => array( |
|
| 138 | + 'onBehalfOfContentOwner' => array( |
|
| 139 | + 'location' => 'query', |
|
| 140 | + 'type' => 'string', |
|
| 141 | + ), |
|
| 142 | + ), |
|
| 143 | + ),'list' => array( |
|
| 144 | + 'path' => 'groupItems', |
|
| 145 | + 'httpMethod' => 'GET', |
|
| 146 | + 'parameters' => array( |
|
| 147 | + 'groupId' => array( |
|
| 148 | + 'location' => 'query', |
|
| 149 | + 'type' => 'string', |
|
| 150 | + 'required' => true, |
|
| 151 | + ), |
|
| 152 | + 'onBehalfOfContentOwner' => array( |
|
| 153 | + 'location' => 'query', |
|
| 154 | + 'type' => 'string', |
|
| 155 | + ), |
|
| 156 | + ), |
|
| 157 | + ), |
|
| 158 | + ) |
|
| 159 | + ) |
|
| 160 | + ); |
|
| 161 | + $this->groups = new Google_Service_YouTubeAnalytics_Groups_Resource( |
|
| 162 | + $this, |
|
| 163 | + $this->serviceName, |
|
| 164 | + 'groups', |
|
| 165 | + array( |
|
| 166 | + 'methods' => array( |
|
| 167 | + 'delete' => array( |
|
| 168 | + 'path' => 'groups', |
|
| 169 | + 'httpMethod' => 'DELETE', |
|
| 170 | + 'parameters' => array( |
|
| 171 | + 'id' => array( |
|
| 172 | + 'location' => 'query', |
|
| 173 | + 'type' => 'string', |
|
| 174 | + 'required' => true, |
|
| 175 | + ), |
|
| 176 | + 'onBehalfOfContentOwner' => array( |
|
| 177 | + 'location' => 'query', |
|
| 178 | + 'type' => 'string', |
|
| 179 | + ), |
|
| 180 | + ), |
|
| 181 | + ),'insert' => array( |
|
| 182 | + 'path' => 'groups', |
|
| 183 | + 'httpMethod' => 'POST', |
|
| 184 | + 'parameters' => array( |
|
| 185 | + 'onBehalfOfContentOwner' => array( |
|
| 186 | + 'location' => 'query', |
|
| 187 | + 'type' => 'string', |
|
| 188 | + ), |
|
| 189 | + ), |
|
| 190 | + ),'list' => array( |
|
| 191 | + 'path' => 'groups', |
|
| 192 | + 'httpMethod' => 'GET', |
|
| 193 | + 'parameters' => array( |
|
| 194 | + 'onBehalfOfContentOwner' => array( |
|
| 195 | + 'location' => 'query', |
|
| 196 | + 'type' => 'string', |
|
| 197 | + ), |
|
| 198 | + 'id' => array( |
|
| 199 | + 'location' => 'query', |
|
| 200 | + 'type' => 'string', |
|
| 201 | + ), |
|
| 202 | + 'mine' => array( |
|
| 203 | + 'location' => 'query', |
|
| 204 | + 'type' => 'boolean', |
|
| 205 | + ), |
|
| 206 | + ), |
|
| 207 | + ),'update' => array( |
|
| 208 | + 'path' => 'groups', |
|
| 209 | + 'httpMethod' => 'PUT', |
|
| 210 | + 'parameters' => array( |
|
| 211 | + 'onBehalfOfContentOwner' => array( |
|
| 212 | + 'location' => 'query', |
|
| 213 | + 'type' => 'string', |
|
| 214 | + ), |
|
| 215 | + ), |
|
| 216 | + ), |
|
| 217 | + ) |
|
| 218 | + ) |
|
| 219 | + ); |
|
| 220 | + $this->reports = new Google_Service_YouTubeAnalytics_Reports_Resource( |
|
| 221 | + $this, |
|
| 222 | + $this->serviceName, |
|
| 223 | + 'reports', |
|
| 224 | + array( |
|
| 225 | + 'methods' => array( |
|
| 226 | + 'query' => array( |
|
| 227 | + 'path' => 'reports', |
|
| 228 | + 'httpMethod' => 'GET', |
|
| 229 | + 'parameters' => array( |
|
| 230 | + 'ids' => array( |
|
| 231 | + 'location' => 'query', |
|
| 232 | + 'type' => 'string', |
|
| 233 | + 'required' => true, |
|
| 234 | + ), |
|
| 235 | + 'start-date' => array( |
|
| 236 | + 'location' => 'query', |
|
| 237 | + 'type' => 'string', |
|
| 238 | + 'required' => true, |
|
| 239 | + ), |
|
| 240 | + 'end-date' => array( |
|
| 241 | + 'location' => 'query', |
|
| 242 | + 'type' => 'string', |
|
| 243 | + 'required' => true, |
|
| 244 | + ), |
|
| 245 | + 'metrics' => array( |
|
| 246 | + 'location' => 'query', |
|
| 247 | + 'type' => 'string', |
|
| 248 | + 'required' => true, |
|
| 249 | + ), |
|
| 250 | + 'max-results' => array( |
|
| 251 | + 'location' => 'query', |
|
| 252 | + 'type' => 'integer', |
|
| 253 | + ), |
|
| 254 | + 'sort' => array( |
|
| 255 | + 'location' => 'query', |
|
| 256 | + 'type' => 'string', |
|
| 257 | + ), |
|
| 258 | + 'dimensions' => array( |
|
| 259 | + 'location' => 'query', |
|
| 260 | + 'type' => 'string', |
|
| 261 | + ), |
|
| 262 | + 'start-index' => array( |
|
| 263 | + 'location' => 'query', |
|
| 264 | + 'type' => 'integer', |
|
| 265 | + ), |
|
| 266 | + 'currency' => array( |
|
| 267 | + 'location' => 'query', |
|
| 268 | + 'type' => 'string', |
|
| 269 | + ), |
|
| 270 | + 'filters' => array( |
|
| 271 | + 'location' => 'query', |
|
| 272 | + 'type' => 'string', |
|
| 273 | + ), |
|
| 274 | + ), |
|
| 275 | + ), |
|
| 276 | + ) |
|
| 277 | + ) |
|
| 278 | + ); |
|
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | 281 | |
@@ -302,9 +302,9 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | public function listBatchReportDefinitions($onBehalfOfContentOwner, $optParams = array()) |
| 304 | 304 | { |
| 305 | - $params = array('onBehalfOfContentOwner' => $onBehalfOfContentOwner); |
|
| 306 | - $params = array_merge($params, $optParams); |
|
| 307 | - return $this->call('list', array($params), "Google_Service_YouTubeAnalytics_BatchReportDefinitionList"); |
|
| 305 | + $params = array('onBehalfOfContentOwner' => $onBehalfOfContentOwner); |
|
| 306 | + $params = array_merge($params, $optParams); |
|
| 307 | + return $this->call('list', array($params), "Google_Service_YouTubeAnalytics_BatchReportDefinitionList"); |
|
| 308 | 308 | } |
| 309 | 309 | } |
| 310 | 310 | |
@@ -332,9 +332,9 @@ discard block |
||
| 332 | 332 | */ |
| 333 | 333 | public function listBatchReports($batchReportDefinitionId, $onBehalfOfContentOwner, $optParams = array()) |
| 334 | 334 | { |
| 335 | - $params = array('batchReportDefinitionId' => $batchReportDefinitionId, 'onBehalfOfContentOwner' => $onBehalfOfContentOwner); |
|
| 336 | - $params = array_merge($params, $optParams); |
|
| 337 | - return $this->call('list', array($params), "Google_Service_YouTubeAnalytics_BatchReportList"); |
|
| 335 | + $params = array('batchReportDefinitionId' => $batchReportDefinitionId, 'onBehalfOfContentOwner' => $onBehalfOfContentOwner); |
|
| 336 | + $params = array_merge($params, $optParams); |
|
| 337 | + return $this->call('list', array($params), "Google_Service_YouTubeAnalytics_BatchReportList"); |
|
| 338 | 338 | } |
| 339 | 339 | } |
| 340 | 340 | |
@@ -371,9 +371,9 @@ discard block |
||
| 371 | 371 | */ |
| 372 | 372 | public function delete($id, $optParams = array()) |
| 373 | 373 | { |
| 374 | - $params = array('id' => $id); |
|
| 375 | - $params = array_merge($params, $optParams); |
|
| 376 | - return $this->call('delete', array($params)); |
|
| 374 | + $params = array('id' => $id); |
|
| 375 | + $params = array_merge($params, $optParams); |
|
| 376 | + return $this->call('delete', array($params)); |
|
| 377 | 377 | } |
| 378 | 378 | |
| 379 | 379 | /** |
@@ -398,9 +398,9 @@ discard block |
||
| 398 | 398 | */ |
| 399 | 399 | public function insert(Google_Service_YouTubeAnalytics_GroupItem $postBody, $optParams = array()) |
| 400 | 400 | { |
| 401 | - $params = array('postBody' => $postBody); |
|
| 402 | - $params = array_merge($params, $optParams); |
|
| 403 | - return $this->call('insert', array($params), "Google_Service_YouTubeAnalytics_GroupItem"); |
|
| 401 | + $params = array('postBody' => $postBody); |
|
| 402 | + $params = array_merge($params, $optParams); |
|
| 403 | + return $this->call('insert', array($params), "Google_Service_YouTubeAnalytics_GroupItem"); |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | /** |
@@ -427,9 +427,9 @@ discard block |
||
| 427 | 427 | */ |
| 428 | 428 | public function listGroupItems($groupId, $optParams = array()) |
| 429 | 429 | { |
| 430 | - $params = array('groupId' => $groupId); |
|
| 431 | - $params = array_merge($params, $optParams); |
|
| 432 | - return $this->call('list', array($params), "Google_Service_YouTubeAnalytics_GroupItemListResponse"); |
|
| 430 | + $params = array('groupId' => $groupId); |
|
| 431 | + $params = array_merge($params, $optParams); |
|
| 432 | + return $this->call('list', array($params), "Google_Service_YouTubeAnalytics_GroupItemListResponse"); |
|
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | 435 | |
@@ -466,9 +466,9 @@ discard block |
||
| 466 | 466 | */ |
| 467 | 467 | public function delete($id, $optParams = array()) |
| 468 | 468 | { |
| 469 | - $params = array('id' => $id); |
|
| 470 | - $params = array_merge($params, $optParams); |
|
| 471 | - return $this->call('delete', array($params)); |
|
| 469 | + $params = array('id' => $id); |
|
| 470 | + $params = array_merge($params, $optParams); |
|
| 471 | + return $this->call('delete', array($params)); |
|
| 472 | 472 | } |
| 473 | 473 | |
| 474 | 474 | /** |
@@ -493,9 +493,9 @@ discard block |
||
| 493 | 493 | */ |
| 494 | 494 | public function insert(Google_Service_YouTubeAnalytics_Group $postBody, $optParams = array()) |
| 495 | 495 | { |
| 496 | - $params = array('postBody' => $postBody); |
|
| 497 | - $params = array_merge($params, $optParams); |
|
| 498 | - return $this->call('insert', array($params), "Google_Service_YouTubeAnalytics_Group"); |
|
| 496 | + $params = array('postBody' => $postBody); |
|
| 497 | + $params = array_merge($params, $optParams); |
|
| 498 | + return $this->call('insert', array($params), "Google_Service_YouTubeAnalytics_Group"); |
|
| 499 | 499 | } |
| 500 | 500 | |
| 501 | 501 | /** |
@@ -526,9 +526,9 @@ discard block |
||
| 526 | 526 | */ |
| 527 | 527 | public function listGroups($optParams = array()) |
| 528 | 528 | { |
| 529 | - $params = array(); |
|
| 530 | - $params = array_merge($params, $optParams); |
|
| 531 | - return $this->call('list', array($params), "Google_Service_YouTubeAnalytics_GroupListResponse"); |
|
| 529 | + $params = array(); |
|
| 530 | + $params = array_merge($params, $optParams); |
|
| 531 | + return $this->call('list', array($params), "Google_Service_YouTubeAnalytics_GroupListResponse"); |
|
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | /** |
@@ -554,9 +554,9 @@ discard block |
||
| 554 | 554 | */ |
| 555 | 555 | public function update(Google_Service_YouTubeAnalytics_Group $postBody, $optParams = array()) |
| 556 | 556 | { |
| 557 | - $params = array('postBody' => $postBody); |
|
| 558 | - $params = array_merge($params, $optParams); |
|
| 559 | - return $this->call('update', array($params), "Google_Service_YouTubeAnalytics_Group"); |
|
| 557 | + $params = array('postBody' => $postBody); |
|
| 558 | + $params = array_merge($params, $optParams); |
|
| 559 | + return $this->call('update', array($params), "Google_Service_YouTubeAnalytics_Group"); |
|
| 560 | 560 | } |
| 561 | 561 | } |
| 562 | 562 | |
@@ -619,9 +619,9 @@ discard block |
||
| 619 | 619 | */ |
| 620 | 620 | public function query($ids, $startDate, $endDate, $metrics, $optParams = array()) |
| 621 | 621 | { |
| 622 | - $params = array('ids' => $ids, 'start-date' => $startDate, 'end-date' => $endDate, 'metrics' => $metrics); |
|
| 623 | - $params = array_merge($params, $optParams); |
|
| 624 | - return $this->call('query', array($params), "Google_Service_YouTubeAnalytics_ResultTable"); |
|
| 622 | + $params = array('ids' => $ids, 'start-date' => $startDate, 'end-date' => $endDate, 'metrics' => $metrics); |
|
| 623 | + $params = array_merge($params, $optParams); |
|
| 624 | + return $this->call('query', array($params), "Google_Service_YouTubeAnalytics_ResultTable"); |
|
| 625 | 625 | } |
| 626 | 626 | } |
| 627 | 627 | |
@@ -645,51 +645,51 @@ discard block |
||
| 645 | 645 | |
| 646 | 646 | public function setId($id) |
| 647 | 647 | { |
| 648 | - $this->id = $id; |
|
| 648 | + $this->id = $id; |
|
| 649 | 649 | } |
| 650 | 650 | public function getId() |
| 651 | 651 | { |
| 652 | - return $this->id; |
|
| 652 | + return $this->id; |
|
| 653 | 653 | } |
| 654 | 654 | public function setKind($kind) |
| 655 | 655 | { |
| 656 | - $this->kind = $kind; |
|
| 656 | + $this->kind = $kind; |
|
| 657 | 657 | } |
| 658 | 658 | public function getKind() |
| 659 | 659 | { |
| 660 | - return $this->kind; |
|
| 660 | + return $this->kind; |
|
| 661 | 661 | } |
| 662 | 662 | public function setOutputs($outputs) |
| 663 | 663 | { |
| 664 | - $this->outputs = $outputs; |
|
| 664 | + $this->outputs = $outputs; |
|
| 665 | 665 | } |
| 666 | 666 | public function getOutputs() |
| 667 | 667 | { |
| 668 | - return $this->outputs; |
|
| 668 | + return $this->outputs; |
|
| 669 | 669 | } |
| 670 | 670 | public function setReportId($reportId) |
| 671 | 671 | { |
| 672 | - $this->reportId = $reportId; |
|
| 672 | + $this->reportId = $reportId; |
|
| 673 | 673 | } |
| 674 | 674 | public function getReportId() |
| 675 | 675 | { |
| 676 | - return $this->reportId; |
|
| 676 | + return $this->reportId; |
|
| 677 | 677 | } |
| 678 | 678 | public function setTimeSpan(Google_Service_YouTubeAnalytics_BatchReportTimeSpan $timeSpan) |
| 679 | 679 | { |
| 680 | - $this->timeSpan = $timeSpan; |
|
| 680 | + $this->timeSpan = $timeSpan; |
|
| 681 | 681 | } |
| 682 | 682 | public function getTimeSpan() |
| 683 | 683 | { |
| 684 | - return $this->timeSpan; |
|
| 684 | + return $this->timeSpan; |
|
| 685 | 685 | } |
| 686 | 686 | public function setTimeUpdated($timeUpdated) |
| 687 | 687 | { |
| 688 | - $this->timeUpdated = $timeUpdated; |
|
| 688 | + $this->timeUpdated = $timeUpdated; |
|
| 689 | 689 | } |
| 690 | 690 | public function getTimeUpdated() |
| 691 | 691 | { |
| 692 | - return $this->timeUpdated; |
|
| 692 | + return $this->timeUpdated; |
|
| 693 | 693 | } |
| 694 | 694 | } |
| 695 | 695 | |
@@ -706,43 +706,43 @@ discard block |
||
| 706 | 706 | |
| 707 | 707 | public function setId($id) |
| 708 | 708 | { |
| 709 | - $this->id = $id; |
|
| 709 | + $this->id = $id; |
|
| 710 | 710 | } |
| 711 | 711 | public function getId() |
| 712 | 712 | { |
| 713 | - return $this->id; |
|
| 713 | + return $this->id; |
|
| 714 | 714 | } |
| 715 | 715 | public function setKind($kind) |
| 716 | 716 | { |
| 717 | - $this->kind = $kind; |
|
| 717 | + $this->kind = $kind; |
|
| 718 | 718 | } |
| 719 | 719 | public function getKind() |
| 720 | 720 | { |
| 721 | - return $this->kind; |
|
| 721 | + return $this->kind; |
|
| 722 | 722 | } |
| 723 | 723 | public function setName($name) |
| 724 | 724 | { |
| 725 | - $this->name = $name; |
|
| 725 | + $this->name = $name; |
|
| 726 | 726 | } |
| 727 | 727 | public function getName() |
| 728 | 728 | { |
| 729 | - return $this->name; |
|
| 729 | + return $this->name; |
|
| 730 | 730 | } |
| 731 | 731 | public function setStatus($status) |
| 732 | 732 | { |
| 733 | - $this->status = $status; |
|
| 733 | + $this->status = $status; |
|
| 734 | 734 | } |
| 735 | 735 | public function getStatus() |
| 736 | 736 | { |
| 737 | - return $this->status; |
|
| 737 | + return $this->status; |
|
| 738 | 738 | } |
| 739 | 739 | public function setType($type) |
| 740 | 740 | { |
| 741 | - $this->type = $type; |
|
| 741 | + $this->type = $type; |
|
| 742 | 742 | } |
| 743 | 743 | public function getType() |
| 744 | 744 | { |
| 745 | - return $this->type; |
|
| 745 | + return $this->type; |
|
| 746 | 746 | } |
| 747 | 747 | } |
| 748 | 748 | |
@@ -758,19 +758,19 @@ discard block |
||
| 758 | 758 | |
| 759 | 759 | public function setItems($items) |
| 760 | 760 | { |
| 761 | - $this->items = $items; |
|
| 761 | + $this->items = $items; |
|
| 762 | 762 | } |
| 763 | 763 | public function getItems() |
| 764 | 764 | { |
| 765 | - return $this->items; |
|
| 765 | + return $this->items; |
|
| 766 | 766 | } |
| 767 | 767 | public function setKind($kind) |
| 768 | 768 | { |
| 769 | - $this->kind = $kind; |
|
| 769 | + $this->kind = $kind; |
|
| 770 | 770 | } |
| 771 | 771 | public function getKind() |
| 772 | 772 | { |
| 773 | - return $this->kind; |
|
| 773 | + return $this->kind; |
|
| 774 | 774 | } |
| 775 | 775 | } |
| 776 | 776 | |
@@ -786,19 +786,19 @@ discard block |
||
| 786 | 786 | |
| 787 | 787 | public function setItems($items) |
| 788 | 788 | { |
| 789 | - $this->items = $items; |
|
| 789 | + $this->items = $items; |
|
| 790 | 790 | } |
| 791 | 791 | public function getItems() |
| 792 | 792 | { |
| 793 | - return $this->items; |
|
| 793 | + return $this->items; |
|
| 794 | 794 | } |
| 795 | 795 | public function setKind($kind) |
| 796 | 796 | { |
| 797 | - $this->kind = $kind; |
|
| 797 | + $this->kind = $kind; |
|
| 798 | 798 | } |
| 799 | 799 | public function getKind() |
| 800 | 800 | { |
| 801 | - return $this->kind; |
|
| 801 | + return $this->kind; |
|
| 802 | 802 | } |
| 803 | 803 | } |
| 804 | 804 | |
@@ -813,27 +813,27 @@ discard block |
||
| 813 | 813 | |
| 814 | 814 | public function setDownloadUrl($downloadUrl) |
| 815 | 815 | { |
| 816 | - $this->downloadUrl = $downloadUrl; |
|
| 816 | + $this->downloadUrl = $downloadUrl; |
|
| 817 | 817 | } |
| 818 | 818 | public function getDownloadUrl() |
| 819 | 819 | { |
| 820 | - return $this->downloadUrl; |
|
| 820 | + return $this->downloadUrl; |
|
| 821 | 821 | } |
| 822 | 822 | public function setFormat($format) |
| 823 | 823 | { |
| 824 | - $this->format = $format; |
|
| 824 | + $this->format = $format; |
|
| 825 | 825 | } |
| 826 | 826 | public function getFormat() |
| 827 | 827 | { |
| 828 | - return $this->format; |
|
| 828 | + return $this->format; |
|
| 829 | 829 | } |
| 830 | 830 | public function setType($type) |
| 831 | 831 | { |
| 832 | - $this->type = $type; |
|
| 832 | + $this->type = $type; |
|
| 833 | 833 | } |
| 834 | 834 | public function getType() |
| 835 | 835 | { |
| 836 | - return $this->type; |
|
| 836 | + return $this->type; |
|
| 837 | 837 | } |
| 838 | 838 | } |
| 839 | 839 | |
@@ -847,19 +847,19 @@ discard block |
||
| 847 | 847 | |
| 848 | 848 | public function setEndTime($endTime) |
| 849 | 849 | { |
| 850 | - $this->endTime = $endTime; |
|
| 850 | + $this->endTime = $endTime; |
|
| 851 | 851 | } |
| 852 | 852 | public function getEndTime() |
| 853 | 853 | { |
| 854 | - return $this->endTime; |
|
| 854 | + return $this->endTime; |
|
| 855 | 855 | } |
| 856 | 856 | public function setStartTime($startTime) |
| 857 | 857 | { |
| 858 | - $this->startTime = $startTime; |
|
| 858 | + $this->startTime = $startTime; |
|
| 859 | 859 | } |
| 860 | 860 | public function getStartTime() |
| 861 | 861 | { |
| 862 | - return $this->startTime; |
|
| 862 | + return $this->startTime; |
|
| 863 | 863 | } |
| 864 | 864 | } |
| 865 | 865 | |
@@ -878,43 +878,43 @@ discard block |
||
| 878 | 878 | |
| 879 | 879 | public function setContentDetails(Google_Service_YouTubeAnalytics_GroupContentDetails $contentDetails) |
| 880 | 880 | { |
| 881 | - $this->contentDetails = $contentDetails; |
|
| 881 | + $this->contentDetails = $contentDetails; |
|
| 882 | 882 | } |
| 883 | 883 | public function getContentDetails() |
| 884 | 884 | { |
| 885 | - return $this->contentDetails; |
|
| 885 | + return $this->contentDetails; |
|
| 886 | 886 | } |
| 887 | 887 | public function setEtag($etag) |
| 888 | 888 | { |
| 889 | - $this->etag = $etag; |
|
| 889 | + $this->etag = $etag; |
|
| 890 | 890 | } |
| 891 | 891 | public function getEtag() |
| 892 | 892 | { |
| 893 | - return $this->etag; |
|
| 893 | + return $this->etag; |
|
| 894 | 894 | } |
| 895 | 895 | public function setId($id) |
| 896 | 896 | { |
| 897 | - $this->id = $id; |
|
| 897 | + $this->id = $id; |
|
| 898 | 898 | } |
| 899 | 899 | public function getId() |
| 900 | 900 | { |
| 901 | - return $this->id; |
|
| 901 | + return $this->id; |
|
| 902 | 902 | } |
| 903 | 903 | public function setKind($kind) |
| 904 | 904 | { |
| 905 | - $this->kind = $kind; |
|
| 905 | + $this->kind = $kind; |
|
| 906 | 906 | } |
| 907 | 907 | public function getKind() |
| 908 | 908 | { |
| 909 | - return $this->kind; |
|
| 909 | + return $this->kind; |
|
| 910 | 910 | } |
| 911 | 911 | public function setSnippet(Google_Service_YouTubeAnalytics_GroupSnippet $snippet) |
| 912 | 912 | { |
| 913 | - $this->snippet = $snippet; |
|
| 913 | + $this->snippet = $snippet; |
|
| 914 | 914 | } |
| 915 | 915 | public function getSnippet() |
| 916 | 916 | { |
| 917 | - return $this->snippet; |
|
| 917 | + return $this->snippet; |
|
| 918 | 918 | } |
| 919 | 919 | } |
| 920 | 920 | |
@@ -928,19 +928,19 @@ discard block |
||
| 928 | 928 | |
| 929 | 929 | public function setItemCount($itemCount) |
| 930 | 930 | { |
| 931 | - $this->itemCount = $itemCount; |
|
| 931 | + $this->itemCount = $itemCount; |
|
| 932 | 932 | } |
| 933 | 933 | public function getItemCount() |
| 934 | 934 | { |
| 935 | - return $this->itemCount; |
|
| 935 | + return $this->itemCount; |
|
| 936 | 936 | } |
| 937 | 937 | public function setItemType($itemType) |
| 938 | 938 | { |
| 939 | - $this->itemType = $itemType; |
|
| 939 | + $this->itemType = $itemType; |
|
| 940 | 940 | } |
| 941 | 941 | public function getItemType() |
| 942 | 942 | { |
| 943 | - return $this->itemType; |
|
| 943 | + return $this->itemType; |
|
| 944 | 944 | } |
| 945 | 945 | } |
| 946 | 946 | |
@@ -958,43 +958,43 @@ discard block |
||
| 958 | 958 | |
| 959 | 959 | public function setEtag($etag) |
| 960 | 960 | { |
| 961 | - $this->etag = $etag; |
|
| 961 | + $this->etag = $etag; |
|
| 962 | 962 | } |
| 963 | 963 | public function getEtag() |
| 964 | 964 | { |
| 965 | - return $this->etag; |
|
| 965 | + return $this->etag; |
|
| 966 | 966 | } |
| 967 | 967 | public function setGroupId($groupId) |
| 968 | 968 | { |
| 969 | - $this->groupId = $groupId; |
|
| 969 | + $this->groupId = $groupId; |
|
| 970 | 970 | } |
| 971 | 971 | public function getGroupId() |
| 972 | 972 | { |
| 973 | - return $this->groupId; |
|
| 973 | + return $this->groupId; |
|
| 974 | 974 | } |
| 975 | 975 | public function setId($id) |
| 976 | 976 | { |
| 977 | - $this->id = $id; |
|
| 977 | + $this->id = $id; |
|
| 978 | 978 | } |
| 979 | 979 | public function getId() |
| 980 | 980 | { |
| 981 | - return $this->id; |
|
| 981 | + return $this->id; |
|
| 982 | 982 | } |
| 983 | 983 | public function setKind($kind) |
| 984 | 984 | { |
| 985 | - $this->kind = $kind; |
|
| 985 | + $this->kind = $kind; |
|
| 986 | 986 | } |
| 987 | 987 | public function getKind() |
| 988 | 988 | { |
| 989 | - return $this->kind; |
|
| 989 | + return $this->kind; |
|
| 990 | 990 | } |
| 991 | 991 | public function setResource(Google_Service_YouTubeAnalytics_GroupItemResource $resource) |
| 992 | 992 | { |
| 993 | - $this->resource = $resource; |
|
| 993 | + $this->resource = $resource; |
|
| 994 | 994 | } |
| 995 | 995 | public function getResource() |
| 996 | 996 | { |
| 997 | - return $this->resource; |
|
| 997 | + return $this->resource; |
|
| 998 | 998 | } |
| 999 | 999 | } |
| 1000 | 1000 | |
@@ -1011,27 +1011,27 @@ discard block |
||
| 1011 | 1011 | |
| 1012 | 1012 | public function setEtag($etag) |
| 1013 | 1013 | { |
| 1014 | - $this->etag = $etag; |
|
| 1014 | + $this->etag = $etag; |
|
| 1015 | 1015 | } |
| 1016 | 1016 | public function getEtag() |
| 1017 | 1017 | { |
| 1018 | - return $this->etag; |
|
| 1018 | + return $this->etag; |
|
| 1019 | 1019 | } |
| 1020 | 1020 | public function setItems($items) |
| 1021 | 1021 | { |
| 1022 | - $this->items = $items; |
|
| 1022 | + $this->items = $items; |
|
| 1023 | 1023 | } |
| 1024 | 1024 | public function getItems() |
| 1025 | 1025 | { |
| 1026 | - return $this->items; |
|
| 1026 | + return $this->items; |
|
| 1027 | 1027 | } |
| 1028 | 1028 | public function setKind($kind) |
| 1029 | 1029 | { |
| 1030 | - $this->kind = $kind; |
|
| 1030 | + $this->kind = $kind; |
|
| 1031 | 1031 | } |
| 1032 | 1032 | public function getKind() |
| 1033 | 1033 | { |
| 1034 | - return $this->kind; |
|
| 1034 | + return $this->kind; |
|
| 1035 | 1035 | } |
| 1036 | 1036 | } |
| 1037 | 1037 | |
@@ -1045,19 +1045,19 @@ discard block |
||
| 1045 | 1045 | |
| 1046 | 1046 | public function setId($id) |
| 1047 | 1047 | { |
| 1048 | - $this->id = $id; |
|
| 1048 | + $this->id = $id; |
|
| 1049 | 1049 | } |
| 1050 | 1050 | public function getId() |
| 1051 | 1051 | { |
| 1052 | - return $this->id; |
|
| 1052 | + return $this->id; |
|
| 1053 | 1053 | } |
| 1054 | 1054 | public function setKind($kind) |
| 1055 | 1055 | { |
| 1056 | - $this->kind = $kind; |
|
| 1056 | + $this->kind = $kind; |
|
| 1057 | 1057 | } |
| 1058 | 1058 | public function getKind() |
| 1059 | 1059 | { |
| 1060 | - return $this->kind; |
|
| 1060 | + return $this->kind; |
|
| 1061 | 1061 | } |
| 1062 | 1062 | } |
| 1063 | 1063 | |
@@ -1074,27 +1074,27 @@ discard block |
||
| 1074 | 1074 | |
| 1075 | 1075 | public function setEtag($etag) |
| 1076 | 1076 | { |
| 1077 | - $this->etag = $etag; |
|
| 1077 | + $this->etag = $etag; |
|
| 1078 | 1078 | } |
| 1079 | 1079 | public function getEtag() |
| 1080 | 1080 | { |
| 1081 | - return $this->etag; |
|
| 1081 | + return $this->etag; |
|
| 1082 | 1082 | } |
| 1083 | 1083 | public function setItems($items) |
| 1084 | 1084 | { |
| 1085 | - $this->items = $items; |
|
| 1085 | + $this->items = $items; |
|
| 1086 | 1086 | } |
| 1087 | 1087 | public function getItems() |
| 1088 | 1088 | { |
| 1089 | - return $this->items; |
|
| 1089 | + return $this->items; |
|
| 1090 | 1090 | } |
| 1091 | 1091 | public function setKind($kind) |
| 1092 | 1092 | { |
| 1093 | - $this->kind = $kind; |
|
| 1093 | + $this->kind = $kind; |
|
| 1094 | 1094 | } |
| 1095 | 1095 | public function getKind() |
| 1096 | 1096 | { |
| 1097 | - return $this->kind; |
|
| 1097 | + return $this->kind; |
|
| 1098 | 1098 | } |
| 1099 | 1099 | } |
| 1100 | 1100 | |
@@ -1108,19 +1108,19 @@ discard block |
||
| 1108 | 1108 | |
| 1109 | 1109 | public function setPublishedAt($publishedAt) |
| 1110 | 1110 | { |
| 1111 | - $this->publishedAt = $publishedAt; |
|
| 1111 | + $this->publishedAt = $publishedAt; |
|
| 1112 | 1112 | } |
| 1113 | 1113 | public function getPublishedAt() |
| 1114 | 1114 | { |
| 1115 | - return $this->publishedAt; |
|
| 1115 | + return $this->publishedAt; |
|
| 1116 | 1116 | } |
| 1117 | 1117 | public function setTitle($title) |
| 1118 | 1118 | { |
| 1119 | - $this->title = $title; |
|
| 1119 | + $this->title = $title; |
|
| 1120 | 1120 | } |
| 1121 | 1121 | public function getTitle() |
| 1122 | 1122 | { |
| 1123 | - return $this->title; |
|
| 1123 | + return $this->title; |
|
| 1124 | 1124 | } |
| 1125 | 1125 | } |
| 1126 | 1126 | |
@@ -1137,27 +1137,27 @@ discard block |
||
| 1137 | 1137 | |
| 1138 | 1138 | public function setColumnHeaders($columnHeaders) |
| 1139 | 1139 | { |
| 1140 | - $this->columnHeaders = $columnHeaders; |
|
| 1140 | + $this->columnHeaders = $columnHeaders; |
|
| 1141 | 1141 | } |
| 1142 | 1142 | public function getColumnHeaders() |
| 1143 | 1143 | { |
| 1144 | - return $this->columnHeaders; |
|
| 1144 | + return $this->columnHeaders; |
|
| 1145 | 1145 | } |
| 1146 | 1146 | public function setKind($kind) |
| 1147 | 1147 | { |
| 1148 | - $this->kind = $kind; |
|
| 1148 | + $this->kind = $kind; |
|
| 1149 | 1149 | } |
| 1150 | 1150 | public function getKind() |
| 1151 | 1151 | { |
| 1152 | - return $this->kind; |
|
| 1152 | + return $this->kind; |
|
| 1153 | 1153 | } |
| 1154 | 1154 | public function setRows($rows) |
| 1155 | 1155 | { |
| 1156 | - $this->rows = $rows; |
|
| 1156 | + $this->rows = $rows; |
|
| 1157 | 1157 | } |
| 1158 | 1158 | public function getRows() |
| 1159 | 1159 | { |
| 1160 | - return $this->rows; |
|
| 1160 | + return $this->rows; |
|
| 1161 | 1161 | } |
| 1162 | 1162 | } |
| 1163 | 1163 | |
@@ -1172,26 +1172,26 @@ discard block |
||
| 1172 | 1172 | |
| 1173 | 1173 | public function setColumnType($columnType) |
| 1174 | 1174 | { |
| 1175 | - $this->columnType = $columnType; |
|
| 1175 | + $this->columnType = $columnType; |
|
| 1176 | 1176 | } |
| 1177 | 1177 | public function getColumnType() |
| 1178 | 1178 | { |
| 1179 | - return $this->columnType; |
|
| 1179 | + return $this->columnType; |
|
| 1180 | 1180 | } |
| 1181 | 1181 | public function setDataType($dataType) |
| 1182 | 1182 | { |
| 1183 | - $this->dataType = $dataType; |
|
| 1183 | + $this->dataType = $dataType; |
|
| 1184 | 1184 | } |
| 1185 | 1185 | public function getDataType() |
| 1186 | 1186 | { |
| 1187 | - return $this->dataType; |
|
| 1187 | + return $this->dataType; |
|
| 1188 | 1188 | } |
| 1189 | 1189 | public function setName($name) |
| 1190 | 1190 | { |
| 1191 | - $this->name = $name; |
|
| 1191 | + $this->name = $name; |
|
| 1192 | 1192 | } |
| 1193 | 1193 | public function getName() |
| 1194 | 1194 | { |
| 1195 | - return $this->name; |
|
| 1195 | + return $this->name; |
|
| 1196 | 1196 | } |
| 1197 | 1197 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | 'type' => 'string', |
| 132 | 132 | ), |
| 133 | 133 | ), |
| 134 | - ),'insert' => array( |
|
| 134 | + ), 'insert' => array( |
|
| 135 | 135 | 'path' => 'groupItems', |
| 136 | 136 | 'httpMethod' => 'POST', |
| 137 | 137 | 'parameters' => array( |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | 'type' => 'string', |
| 141 | 141 | ), |
| 142 | 142 | ), |
| 143 | - ),'list' => array( |
|
| 143 | + ), 'list' => array( |
|
| 144 | 144 | 'path' => 'groupItems', |
| 145 | 145 | 'httpMethod' => 'GET', |
| 146 | 146 | 'parameters' => array( |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | 'type' => 'string', |
| 179 | 179 | ), |
| 180 | 180 | ), |
| 181 | - ),'insert' => array( |
|
| 181 | + ), 'insert' => array( |
|
| 182 | 182 | 'path' => 'groups', |
| 183 | 183 | 'httpMethod' => 'POST', |
| 184 | 184 | 'parameters' => array( |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | 'type' => 'string', |
| 188 | 188 | ), |
| 189 | 189 | ), |
| 190 | - ),'list' => array( |
|
| 190 | + ), 'list' => array( |
|
| 191 | 191 | 'path' => 'groups', |
| 192 | 192 | 'httpMethod' => 'GET', |
| 193 | 193 | 'parameters' => array( |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | 'type' => 'boolean', |
| 205 | 205 | ), |
| 206 | 206 | ), |
| 207 | - ),'update' => array( |
|
| 207 | + ), 'update' => array( |
|
| 208 | 208 | 'path' => 'groups', |
| 209 | 209 | 'httpMethod' => 'PUT', |
| 210 | 210 | 'parameters' => array( |
@@ -21,6 +21,9 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | class Google_Utils |
| 23 | 23 | { |
| 24 | + /** |
|
| 25 | + * @param string $data |
|
| 26 | + */ |
|
| 24 | 27 | public static function urlSafeB64Encode($data) |
| 25 | 28 | { |
| 26 | 29 | $b64 = base64_encode($data); |
@@ -23,23 +23,23 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | public static function urlSafeB64Encode($data) |
| 25 | 25 | { |
| 26 | - $b64 = base64_encode($data); |
|
| 27 | - $b64 = str_replace( |
|
| 28 | - array('+', '/', '\r', '\n', '='), |
|
| 29 | - array('-', '_'), |
|
| 30 | - $b64 |
|
| 31 | - ); |
|
| 32 | - return $b64; |
|
| 26 | + $b64 = base64_encode($data); |
|
| 27 | + $b64 = str_replace( |
|
| 28 | + array('+', '/', '\r', '\n', '='), |
|
| 29 | + array('-', '_'), |
|
| 30 | + $b64 |
|
| 31 | + ); |
|
| 32 | + return $b64; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | public static function urlSafeB64Decode($b64) |
| 36 | 36 | { |
| 37 | - $b64 = str_replace( |
|
| 38 | - array('-', '_'), |
|
| 39 | - array('+', '/'), |
|
| 40 | - $b64 |
|
| 41 | - ); |
|
| 42 | - return base64_decode($b64); |
|
| 37 | + $b64 = str_replace( |
|
| 38 | + array('-', '_'), |
|
| 39 | + array('+', '/'), |
|
| 40 | + $b64 |
|
| 41 | + ); |
|
| 42 | + return base64_decode($b64); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -59,45 +59,45 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | public static function getStrLen($str) |
| 61 | 61 | { |
| 62 | - $strlenVar = strlen($str); |
|
| 63 | - $d = $ret = 0; |
|
| 64 | - for ($count = 0; $count < $strlenVar; ++ $count) { |
|
| 65 | - $ordinalValue = ord($str{$ret}); |
|
| 66 | - switch (true) { |
|
| 67 | - case (($ordinalValue >= 0x20) && ($ordinalValue <= 0x7F)): |
|
| 68 | - // characters U-00000000 - U-0000007F (same as ASCII) |
|
| 69 | - $ret ++; |
|
| 70 | - break; |
|
| 71 | - case (($ordinalValue & 0xE0) == 0xC0): |
|
| 72 | - // characters U-00000080 - U-000007FF, mask 110XXXXX |
|
| 73 | - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
| 74 | - $ret += 2; |
|
| 75 | - break; |
|
| 76 | - case (($ordinalValue & 0xF0) == 0xE0): |
|
| 77 | - // characters U-00000800 - U-0000FFFF, mask 1110XXXX |
|
| 78 | - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
| 79 | - $ret += 3; |
|
| 80 | - break; |
|
| 81 | - case (($ordinalValue & 0xF8) == 0xF0): |
|
| 82 | - // characters U-00010000 - U-001FFFFF, mask 11110XXX |
|
| 83 | - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
| 84 | - $ret += 4; |
|
| 85 | - break; |
|
| 86 | - case (($ordinalValue & 0xFC) == 0xF8): |
|
| 87 | - // characters U-00200000 - U-03FFFFFF, mask 111110XX |
|
| 88 | - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
| 89 | - $ret += 5; |
|
| 90 | - break; |
|
| 91 | - case (($ordinalValue & 0xFE) == 0xFC): |
|
| 92 | - // characters U-04000000 - U-7FFFFFFF, mask 1111110X |
|
| 93 | - // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
| 94 | - $ret += 6; |
|
| 95 | - break; |
|
| 96 | - default: |
|
| 97 | - $ret ++; |
|
| 98 | - } |
|
| 99 | - } |
|
| 100 | - return $ret; |
|
| 62 | + $strlenVar = strlen($str); |
|
| 63 | + $d = $ret = 0; |
|
| 64 | + for ($count = 0; $count < $strlenVar; ++ $count) { |
|
| 65 | + $ordinalValue = ord($str{$ret}); |
|
| 66 | + switch (true) { |
|
| 67 | + case (($ordinalValue >= 0x20) && ($ordinalValue <= 0x7F)): |
|
| 68 | + // characters U-00000000 - U-0000007F (same as ASCII) |
|
| 69 | + $ret ++; |
|
| 70 | + break; |
|
| 71 | + case (($ordinalValue & 0xE0) == 0xC0): |
|
| 72 | + // characters U-00000080 - U-000007FF, mask 110XXXXX |
|
| 73 | + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
| 74 | + $ret += 2; |
|
| 75 | + break; |
|
| 76 | + case (($ordinalValue & 0xF0) == 0xE0): |
|
| 77 | + // characters U-00000800 - U-0000FFFF, mask 1110XXXX |
|
| 78 | + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
| 79 | + $ret += 3; |
|
| 80 | + break; |
|
| 81 | + case (($ordinalValue & 0xF8) == 0xF0): |
|
| 82 | + // characters U-00010000 - U-001FFFFF, mask 11110XXX |
|
| 83 | + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
| 84 | + $ret += 4; |
|
| 85 | + break; |
|
| 86 | + case (($ordinalValue & 0xFC) == 0xF8): |
|
| 87 | + // characters U-00200000 - U-03FFFFFF, mask 111110XX |
|
| 88 | + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
| 89 | + $ret += 5; |
|
| 90 | + break; |
|
| 91 | + case (($ordinalValue & 0xFE) == 0xFC): |
|
| 92 | + // characters U-04000000 - U-7FFFFFFF, mask 1111110X |
|
| 93 | + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 |
|
| 94 | + $ret += 6; |
|
| 95 | + break; |
|
| 96 | + default: |
|
| 97 | + $ret ++; |
|
| 98 | + } |
|
| 99 | + } |
|
| 100 | + return $ret; |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -107,15 +107,15 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public static function normalize($arr) |
| 109 | 109 | { |
| 110 | - if (!is_array($arr)) { |
|
| 111 | - return array(); |
|
| 112 | - } |
|
| 110 | + if (!is_array($arr)) { |
|
| 111 | + return array(); |
|
| 112 | + } |
|
| 113 | 113 | |
| 114 | - $normalized = array(); |
|
| 115 | - foreach ($arr as $key => $val) { |
|
| 116 | - $normalized[strtolower($key)] = $val; |
|
| 117 | - } |
|
| 118 | - return $normalized; |
|
| 114 | + $normalized = array(); |
|
| 115 | + foreach ($arr as $key => $val) { |
|
| 116 | + $normalized[strtolower($key)] = $val; |
|
| 117 | + } |
|
| 118 | + return $normalized; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | public static function camelCase($value) |
| 127 | 127 | { |
| 128 | - $value = ucwords(str_replace(array('-', '_'), ' ', $value)); |
|
| 129 | - $value = str_replace(' ', '', $value); |
|
| 130 | - $value[0] = strtolower($value[0]); |
|
| 131 | - return $value; |
|
| 128 | + $value = ucwords(str_replace(array('-', '_'), ' ', $value)); |
|
| 129 | + $value = str_replace(' ', '', $value); |
|
| 130 | + $value[0] = strtolower($value[0]); |
|
| 131 | + return $value; |
|
| 132 | 132 | } |
| 133 | 133 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | switch (true) { |
| 67 | 67 | case (($ordinalValue >= 0x20) && ($ordinalValue <= 0x7F)): |
| 68 | 68 | // characters U-00000000 - U-0000007F (same as ASCII) |
| 69 | - $ret ++; |
|
| 69 | + $ret++; |
|
| 70 | 70 | break; |
| 71 | 71 | case (($ordinalValue & 0xE0) == 0xC0): |
| 72 | 72 | // characters U-00000080 - U-000007FF, mask 110XXXXX |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $ret += 6; |
| 95 | 95 | break; |
| 96 | 96 | default: |
| 97 | - $ret ++; |
|
| 97 | + $ret++; |
|
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | return $ret; |
@@ -23,4 +23,4 @@ |
||
| 23 | 23 | $error = "google-api-php-client's autoloader was moved to src/Google/autoload.php in 1.1.3. This "; |
| 24 | 24 | $error .= "redirect will be removed in 1.2. Please adjust your code to use the new location."; |
| 25 | 25 | trigger_error($error, E_USER_DEPRECATED); |
| 26 | -require_once dirname(__FILE__) . '/src/Google/autoload.php'; |
|
| 26 | +require_once dirname(__FILE__).'/src/Google/autoload.php'; |
|
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | public function __construct(Google_Client $client) |
| 29 | 29 | { |
| 30 | - $this->client = $client; |
|
| 30 | + $this->client = $client; |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function getClient() |
| 38 | 38 | { |
| 39 | - return $this->client; |
|
| 39 | + return $this->client; |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function createBatch() |
| 48 | 48 | { |
| 49 | - return new Google_Http_Batch( |
|
| 50 | - $this->client, |
|
| 51 | - false, |
|
| 52 | - $this->rootUrl, |
|
| 53 | - $this->batchPath |
|
| 54 | - ); |
|
| 49 | + return new Google_Http_Batch( |
|
| 50 | + $this->client, |
|
| 51 | + false, |
|
| 52 | + $this->rootUrl, |
|
| 53 | + $this->batchPath |
|
| 54 | + ); |
|
| 55 | 55 | } |
| 56 | 56 | } |
@@ -15,87 +15,87 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function rewind() |
| 17 | 17 | { |
| 18 | - if (isset($this->modelData[$this->collection_key]) |
|
| 19 | - && is_array($this->modelData[$this->collection_key])) { |
|
| 20 | - reset($this->modelData[$this->collection_key]); |
|
| 21 | - } |
|
| 18 | + if (isset($this->modelData[$this->collection_key]) |
|
| 19 | + && is_array($this->modelData[$this->collection_key])) { |
|
| 20 | + reset($this->modelData[$this->collection_key]); |
|
| 21 | + } |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function current() |
| 25 | 25 | { |
| 26 | - $this->coerceType($this->key()); |
|
| 27 | - if (is_array($this->modelData[$this->collection_key])) { |
|
| 28 | - return current($this->modelData[$this->collection_key]); |
|
| 29 | - } |
|
| 26 | + $this->coerceType($this->key()); |
|
| 27 | + if (is_array($this->modelData[$this->collection_key])) { |
|
| 28 | + return current($this->modelData[$this->collection_key]); |
|
| 29 | + } |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | public function key() |
| 33 | 33 | { |
| 34 | - if (isset($this->modelData[$this->collection_key]) |
|
| 35 | - && is_array($this->modelData[$this->collection_key])) { |
|
| 36 | - return key($this->modelData[$this->collection_key]); |
|
| 37 | - } |
|
| 34 | + if (isset($this->modelData[$this->collection_key]) |
|
| 35 | + && is_array($this->modelData[$this->collection_key])) { |
|
| 36 | + return key($this->modelData[$this->collection_key]); |
|
| 37 | + } |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | public function next() |
| 41 | 41 | { |
| 42 | - return next($this->modelData[$this->collection_key]); |
|
| 42 | + return next($this->modelData[$this->collection_key]); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function valid() |
| 46 | 46 | { |
| 47 | - $key = $this->key(); |
|
| 48 | - return $key !== null && $key !== false; |
|
| 47 | + $key = $this->key(); |
|
| 48 | + return $key !== null && $key !== false; |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | public function count() |
| 52 | 52 | { |
| 53 | - if (!isset($this->modelData[$this->collection_key])) { |
|
| 54 | - return 0; |
|
| 55 | - } |
|
| 56 | - return count($this->modelData[$this->collection_key]); |
|
| 53 | + if (!isset($this->modelData[$this->collection_key])) { |
|
| 54 | + return 0; |
|
| 55 | + } |
|
| 56 | + return count($this->modelData[$this->collection_key]); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | public function offsetExists($offset) |
| 60 | 60 | { |
| 61 | - if (!is_numeric($offset)) { |
|
| 62 | - return parent::offsetExists($offset); |
|
| 63 | - } |
|
| 64 | - return isset($this->modelData[$this->collection_key][$offset]); |
|
| 61 | + if (!is_numeric($offset)) { |
|
| 62 | + return parent::offsetExists($offset); |
|
| 63 | + } |
|
| 64 | + return isset($this->modelData[$this->collection_key][$offset]); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | public function offsetGet($offset) |
| 68 | 68 | { |
| 69 | - if (!is_numeric($offset)) { |
|
| 70 | - return parent::offsetGet($offset); |
|
| 71 | - } |
|
| 72 | - $this->coerceType($offset); |
|
| 73 | - return $this->modelData[$this->collection_key][$offset]; |
|
| 69 | + if (!is_numeric($offset)) { |
|
| 70 | + return parent::offsetGet($offset); |
|
| 71 | + } |
|
| 72 | + $this->coerceType($offset); |
|
| 73 | + return $this->modelData[$this->collection_key][$offset]; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | public function offsetSet($offset, $value) |
| 77 | 77 | { |
| 78 | - if (!is_numeric($offset)) { |
|
| 79 | - return parent::offsetSet($offset, $value); |
|
| 80 | - } |
|
| 81 | - $this->modelData[$this->collection_key][$offset] = $value; |
|
| 78 | + if (!is_numeric($offset)) { |
|
| 79 | + return parent::offsetSet($offset, $value); |
|
| 80 | + } |
|
| 81 | + $this->modelData[$this->collection_key][$offset] = $value; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | public function offsetUnset($offset) |
| 85 | 85 | { |
| 86 | - if (!is_numeric($offset)) { |
|
| 87 | - return parent::offsetUnset($offset); |
|
| 88 | - } |
|
| 89 | - unset($this->modelData[$this->collection_key][$offset]); |
|
| 86 | + if (!is_numeric($offset)) { |
|
| 87 | + return parent::offsetUnset($offset); |
|
| 88 | + } |
|
| 89 | + unset($this->modelData[$this->collection_key][$offset]); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | private function coerceType($offset) |
| 93 | 93 | { |
| 94 | - $typeKey = $this->keyType($this->collection_key); |
|
| 95 | - if (isset($this->$typeKey) && !is_object($this->modelData[$this->collection_key][$offset])) { |
|
| 96 | - $type = $this->$typeKey; |
|
| 97 | - $this->modelData[$this->collection_key][$offset] = |
|
| 98 | - new $type($this->modelData[$this->collection_key][$offset]); |
|
| 99 | - } |
|
| 94 | + $typeKey = $this->keyType($this->collection_key); |
|
| 95 | + if (isset($this->$typeKey) && !is_object($this->modelData[$this->collection_key][$offset])) { |
|
| 96 | + $type = $this->$typeKey; |
|
| 97 | + $this->modelData[$this->collection_key][$offset] = |
|
| 98 | + new $type($this->modelData[$this->collection_key][$offset]); |
|
| 99 | + } |
|
| 100 | 100 | } |
| 101 | 101 | } |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | if (!class_exists('Google_Client')) { |
| 4 | - require_once dirname(__FILE__) . '/autoload.php'; |
|
| 4 | + require_once dirname(__FILE__).'/autoload.php'; |
|
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | /** |
@@ -38,20 +38,20 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function __construct($pem) |
| 40 | 40 | { |
| 41 | - if (!function_exists('openssl_x509_read')) { |
|
| 42 | - throw new Google_Exception('Google API PHP client needs the openssl PHP extension'); |
|
| 43 | - } |
|
| 44 | - $this->publicKey = openssl_x509_read($pem); |
|
| 45 | - if (!$this->publicKey) { |
|
| 46 | - throw new Google_Auth_Exception("Unable to parse PEM: $pem"); |
|
| 47 | - } |
|
| 41 | + if (!function_exists('openssl_x509_read')) { |
|
| 42 | + throw new Google_Exception('Google API PHP client needs the openssl PHP extension'); |
|
| 43 | + } |
|
| 44 | + $this->publicKey = openssl_x509_read($pem); |
|
| 45 | + if (!$this->publicKey) { |
|
| 46 | + throw new Google_Auth_Exception("Unable to parse PEM: $pem"); |
|
| 47 | + } |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | public function __destruct() |
| 51 | 51 | { |
| 52 | - if ($this->publicKey) { |
|
| 53 | - openssl_x509_free($this->publicKey); |
|
| 54 | - } |
|
| 52 | + if ($this->publicKey) { |
|
| 53 | + openssl_x509_free($this->publicKey); |
|
| 54 | + } |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -65,11 +65,11 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public function verify($data, $signature) |
| 67 | 67 | { |
| 68 | - $hash = defined("OPENSSL_ALGO_SHA256") ? OPENSSL_ALGO_SHA256 : "sha256"; |
|
| 69 | - $status = openssl_verify($data, $signature, $this->publicKey, $hash); |
|
| 70 | - if ($status === -1) { |
|
| 71 | - throw new Google_Auth_Exception('Signature verification error: ' . openssl_error_string()); |
|
| 72 | - } |
|
| 73 | - return $status === 1; |
|
| 68 | + $hash = defined("OPENSSL_ALGO_SHA256") ? OPENSSL_ALGO_SHA256 : "sha256"; |
|
| 69 | + $status = openssl_verify($data, $signature, $this->publicKey, $hash); |
|
| 70 | + if ($status === -1) { |
|
| 71 | + throw new Google_Auth_Exception('Signature verification error: ' . openssl_error_string()); |
|
| 72 | + } |
|
| 73 | + return $status === 1; |
|
| 74 | 74 | } |
| 75 | 75 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | 18 | if (!class_exists('Google_Client')) { |
| 19 | - require_once dirname(__FILE__) . '/../autoload.php'; |
|
| 19 | + require_once dirname(__FILE__).'/../autoload.php'; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $hash = defined("OPENSSL_ALGO_SHA256") ? OPENSSL_ALGO_SHA256 : "sha256"; |
| 69 | 69 | $status = openssl_verify($data, $signature, $this->publicKey, $hash); |
| 70 | 70 | if ($status === -1) { |
| 71 | - throw new Google_Auth_Exception('Signature verification error: ' . openssl_error_string()); |
|
| 71 | + throw new Google_Auth_Exception('Signature verification error: '.openssl_error_string()); |
|
| 72 | 72 | } |
| 73 | 73 | return $status === 1; |
| 74 | 74 | } |
@@ -36,44 +36,44 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | public function __construct(Google_Client $client) |
| 38 | 38 | { |
| 39 | - if (! function_exists('apc_add') ) { |
|
| 40 | - $error = "Apc functions not available"; |
|
| 39 | + if (! function_exists('apc_add') ) { |
|
| 40 | + $error = "Apc functions not available"; |
|
| 41 | 41 | |
| 42 | - $client->getLogger()->error($error); |
|
| 43 | - throw new Google_Cache_Exception($error); |
|
| 44 | - } |
|
| 42 | + $client->getLogger()->error($error); |
|
| 43 | + throw new Google_Cache_Exception($error); |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - $this->client = $client; |
|
| 46 | + $this->client = $client; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | - * @inheritDoc |
|
| 51 | - */ |
|
| 50 | + * @inheritDoc |
|
| 51 | + */ |
|
| 52 | 52 | public function get($key, $expiration = false) |
| 53 | 53 | { |
| 54 | - $ret = apc_fetch($key); |
|
| 55 | - if ($ret === false) { |
|
| 56 | - $this->client->getLogger()->debug( |
|
| 57 | - 'APC cache miss', |
|
| 58 | - array('key' => $key) |
|
| 59 | - ); |
|
| 60 | - return false; |
|
| 61 | - } |
|
| 62 | - if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) { |
|
| 63 | - $this->client->getLogger()->debug( |
|
| 64 | - 'APC cache miss (expired)', |
|
| 65 | - array('key' => $key, 'var' => $ret) |
|
| 66 | - ); |
|
| 67 | - $this->delete($key); |
|
| 68 | - return false; |
|
| 69 | - } |
|
| 54 | + $ret = apc_fetch($key); |
|
| 55 | + if ($ret === false) { |
|
| 56 | + $this->client->getLogger()->debug( |
|
| 57 | + 'APC cache miss', |
|
| 58 | + array('key' => $key) |
|
| 59 | + ); |
|
| 60 | + return false; |
|
| 61 | + } |
|
| 62 | + if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) { |
|
| 63 | + $this->client->getLogger()->debug( |
|
| 64 | + 'APC cache miss (expired)', |
|
| 65 | + array('key' => $key, 'var' => $ret) |
|
| 66 | + ); |
|
| 67 | + $this->delete($key); |
|
| 68 | + return false; |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | - $this->client->getLogger()->debug( |
|
| 72 | - 'APC cache hit', |
|
| 73 | - array('key' => $key, 'var' => $ret) |
|
| 74 | - ); |
|
| 71 | + $this->client->getLogger()->debug( |
|
| 72 | + 'APC cache hit', |
|
| 73 | + array('key' => $key, 'var' => $ret) |
|
| 74 | + ); |
|
| 75 | 75 | |
| 76 | - return $ret['data']; |
|
| 76 | + return $ret['data']; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -81,21 +81,21 @@ discard block |
||
| 81 | 81 | */ |
| 82 | 82 | public function set($key, $value) |
| 83 | 83 | { |
| 84 | - $var = array('time' => time(), 'data' => $value); |
|
| 85 | - $rc = apc_store($key, $var); |
|
| 84 | + $var = array('time' => time(), 'data' => $value); |
|
| 85 | + $rc = apc_store($key, $var); |
|
| 86 | 86 | |
| 87 | - if ($rc == false) { |
|
| 88 | - $this->client->getLogger()->error( |
|
| 89 | - 'APC cache set failed', |
|
| 90 | - array('key' => $key, 'var' => $var) |
|
| 91 | - ); |
|
| 92 | - throw new Google_Cache_Exception("Couldn't store data"); |
|
| 93 | - } |
|
| 87 | + if ($rc == false) { |
|
| 88 | + $this->client->getLogger()->error( |
|
| 89 | + 'APC cache set failed', |
|
| 90 | + array('key' => $key, 'var' => $var) |
|
| 91 | + ); |
|
| 92 | + throw new Google_Cache_Exception("Couldn't store data"); |
|
| 93 | + } |
|
| 94 | 94 | |
| 95 | - $this->client->getLogger()->debug( |
|
| 96 | - 'APC cache set', |
|
| 97 | - array('key' => $key, 'var' => $var) |
|
| 98 | - ); |
|
| 95 | + $this->client->getLogger()->debug( |
|
| 96 | + 'APC cache set', |
|
| 97 | + array('key' => $key, 'var' => $var) |
|
| 98 | + ); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
@@ -104,10 +104,10 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function delete($key) |
| 106 | 106 | { |
| 107 | - $this->client->getLogger()->debug( |
|
| 108 | - 'APC cache delete', |
|
| 109 | - array('key' => $key) |
|
| 110 | - ); |
|
| 111 | - apc_delete($key); |
|
| 107 | + $this->client->getLogger()->debug( |
|
| 108 | + 'APC cache delete', |
|
| 109 | + array('key' => $key) |
|
| 110 | + ); |
|
| 111 | + apc_delete($key); |
|
| 112 | 112 | } |
| 113 | 113 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | 18 | if (!class_exists('Google_Client')) { |
| 19 | - require_once dirname(__FILE__) . '/../autoload.php'; |
|
| 19 | + require_once dirname(__FILE__).'/../autoload.php'; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | public function __construct(Google_Client $client) |
| 38 | 38 | { |
| 39 | - if (! function_exists('apc_add') ) { |
|
| 39 | + if (!function_exists('apc_add')) { |
|
| 40 | 40 | $error = "Apc functions not available"; |
| 41 | 41 | |
| 42 | 42 | $client->getLogger()->error($error); |
@@ -43,29 +43,29 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | public function __construct(Google_Client $client) |
| 45 | 45 | { |
| 46 | - if (!function_exists('memcache_connect') && !class_exists("Memcached")) { |
|
| 47 | - $error = "Memcache functions not available"; |
|
| 48 | - |
|
| 49 | - $client->getLogger()->error($error); |
|
| 50 | - throw new Google_Cache_Exception($error); |
|
| 51 | - } |
|
| 52 | - |
|
| 53 | - $this->client = $client; |
|
| 54 | - |
|
| 55 | - if ($client->isAppEngine()) { |
|
| 56 | - // No credentials needed for GAE. |
|
| 57 | - $this->mc = new Memcached(); |
|
| 58 | - $this->connection = true; |
|
| 59 | - } else { |
|
| 60 | - $this->host = $client->getClassConfig($this, 'host'); |
|
| 61 | - $this->port = $client->getClassConfig($this, 'port'); |
|
| 62 | - if (empty($this->host) || (empty($this->port) && (string) $this->port != "0")) { |
|
| 63 | - $error = "You need to supply a valid memcache host and port"; |
|
| 64 | - |
|
| 65 | - $client->getLogger()->error($error); |
|
| 66 | - throw new Google_Cache_Exception($error); |
|
| 67 | - } |
|
| 68 | - } |
|
| 46 | + if (!function_exists('memcache_connect') && !class_exists("Memcached")) { |
|
| 47 | + $error = "Memcache functions not available"; |
|
| 48 | + |
|
| 49 | + $client->getLogger()->error($error); |
|
| 50 | + throw new Google_Cache_Exception($error); |
|
| 51 | + } |
|
| 52 | + |
|
| 53 | + $this->client = $client; |
|
| 54 | + |
|
| 55 | + if ($client->isAppEngine()) { |
|
| 56 | + // No credentials needed for GAE. |
|
| 57 | + $this->mc = new Memcached(); |
|
| 58 | + $this->connection = true; |
|
| 59 | + } else { |
|
| 60 | + $this->host = $client->getClassConfig($this, 'host'); |
|
| 61 | + $this->port = $client->getClassConfig($this, 'port'); |
|
| 62 | + if (empty($this->host) || (empty($this->port) && (string) $this->port != "0")) { |
|
| 63 | + $error = "You need to supply a valid memcache host and port"; |
|
| 64 | + |
|
| 65 | + $client->getLogger()->error($error); |
|
| 66 | + throw new Google_Cache_Exception($error); |
|
| 67 | + } |
|
| 68 | + } |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -73,35 +73,35 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function get($key, $expiration = false) |
| 75 | 75 | { |
| 76 | - $this->connect(); |
|
| 77 | - $ret = false; |
|
| 78 | - if ($this->mc) { |
|
| 79 | - $ret = $this->mc->get($key); |
|
| 80 | - } else { |
|
| 81 | - $ret = memcache_get($this->connection, $key); |
|
| 82 | - } |
|
| 83 | - if ($ret === false) { |
|
| 84 | - $this->client->getLogger()->debug( |
|
| 85 | - 'Memcache cache miss', |
|
| 86 | - array('key' => $key) |
|
| 87 | - ); |
|
| 88 | - return false; |
|
| 89 | - } |
|
| 90 | - if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) { |
|
| 91 | - $this->client->getLogger()->debug( |
|
| 92 | - 'Memcache cache miss (expired)', |
|
| 93 | - array('key' => $key, 'var' => $ret) |
|
| 94 | - ); |
|
| 95 | - $this->delete($key); |
|
| 96 | - return false; |
|
| 97 | - } |
|
| 98 | - |
|
| 99 | - $this->client->getLogger()->debug( |
|
| 100 | - 'Memcache cache hit', |
|
| 101 | - array('key' => $key, 'var' => $ret) |
|
| 102 | - ); |
|
| 103 | - |
|
| 104 | - return $ret['data']; |
|
| 76 | + $this->connect(); |
|
| 77 | + $ret = false; |
|
| 78 | + if ($this->mc) { |
|
| 79 | + $ret = $this->mc->get($key); |
|
| 80 | + } else { |
|
| 81 | + $ret = memcache_get($this->connection, $key); |
|
| 82 | + } |
|
| 83 | + if ($ret === false) { |
|
| 84 | + $this->client->getLogger()->debug( |
|
| 85 | + 'Memcache cache miss', |
|
| 86 | + array('key' => $key) |
|
| 87 | + ); |
|
| 88 | + return false; |
|
| 89 | + } |
|
| 90 | + if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) { |
|
| 91 | + $this->client->getLogger()->debug( |
|
| 92 | + 'Memcache cache miss (expired)', |
|
| 93 | + array('key' => $key, 'var' => $ret) |
|
| 94 | + ); |
|
| 95 | + $this->delete($key); |
|
| 96 | + return false; |
|
| 97 | + } |
|
| 98 | + |
|
| 99 | + $this->client->getLogger()->debug( |
|
| 100 | + 'Memcache cache hit', |
|
| 101 | + array('key' => $key, 'var' => $ret) |
|
| 102 | + ); |
|
| 103 | + |
|
| 104 | + return $ret['data']; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -112,29 +112,29 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | public function set($key, $value) |
| 114 | 114 | { |
| 115 | - $this->connect(); |
|
| 116 | - // we store it with the cache_time default expiration so objects will at |
|
| 117 | - // least get cleaned eventually. |
|
| 118 | - $data = array('time' => time(), 'data' => $value); |
|
| 119 | - $rc = false; |
|
| 120 | - if ($this->mc) { |
|
| 121 | - $rc = $this->mc->set($key, $data); |
|
| 122 | - } else { |
|
| 123 | - $rc = memcache_set($this->connection, $key, $data, false); |
|
| 124 | - } |
|
| 125 | - if ($rc == false) { |
|
| 126 | - $this->client->getLogger()->error( |
|
| 127 | - 'Memcache cache set failed', |
|
| 128 | - array('key' => $key, 'var' => $data) |
|
| 129 | - ); |
|
| 130 | - |
|
| 131 | - throw new Google_Cache_Exception("Couldn't store data in cache"); |
|
| 132 | - } |
|
| 133 | - |
|
| 134 | - $this->client->getLogger()->debug( |
|
| 135 | - 'Memcache cache set', |
|
| 136 | - array('key' => $key, 'var' => $data) |
|
| 137 | - ); |
|
| 115 | + $this->connect(); |
|
| 116 | + // we store it with the cache_time default expiration so objects will at |
|
| 117 | + // least get cleaned eventually. |
|
| 118 | + $data = array('time' => time(), 'data' => $value); |
|
| 119 | + $rc = false; |
|
| 120 | + if ($this->mc) { |
|
| 121 | + $rc = $this->mc->set($key, $data); |
|
| 122 | + } else { |
|
| 123 | + $rc = memcache_set($this->connection, $key, $data, false); |
|
| 124 | + } |
|
| 125 | + if ($rc == false) { |
|
| 126 | + $this->client->getLogger()->error( |
|
| 127 | + 'Memcache cache set failed', |
|
| 128 | + array('key' => $key, 'var' => $data) |
|
| 129 | + ); |
|
| 130 | + |
|
| 131 | + throw new Google_Cache_Exception("Couldn't store data in cache"); |
|
| 132 | + } |
|
| 133 | + |
|
| 134 | + $this->client->getLogger()->debug( |
|
| 135 | + 'Memcache cache set', |
|
| 136 | + array('key' => $key, 'var' => $data) |
|
| 137 | + ); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
@@ -143,17 +143,17 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | public function delete($key) |
| 145 | 145 | { |
| 146 | - $this->connect(); |
|
| 147 | - if ($this->mc) { |
|
| 148 | - $this->mc->delete($key, 0); |
|
| 149 | - } else { |
|
| 150 | - memcache_delete($this->connection, $key, 0); |
|
| 151 | - } |
|
| 152 | - |
|
| 153 | - $this->client->getLogger()->debug( |
|
| 154 | - 'Memcache cache delete', |
|
| 155 | - array('key' => $key) |
|
| 156 | - ); |
|
| 146 | + $this->connect(); |
|
| 147 | + if ($this->mc) { |
|
| 148 | + $this->mc->delete($key, 0); |
|
| 149 | + } else { |
|
| 150 | + memcache_delete($this->connection, $key, 0); |
|
| 151 | + } |
|
| 152 | + |
|
| 153 | + $this->client->getLogger()->debug( |
|
| 154 | + 'Memcache cache delete', |
|
| 155 | + array('key' => $key) |
|
| 156 | + ); |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
@@ -162,23 +162,23 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | private function connect() |
| 164 | 164 | { |
| 165 | - if ($this->connection) { |
|
| 166 | - return; |
|
| 167 | - } |
|
| 168 | - |
|
| 169 | - if (class_exists("Memcached")) { |
|
| 170 | - $this->mc = new Memcached(); |
|
| 171 | - $this->mc->addServer($this->host, $this->port); |
|
| 172 | - $this->connection = true; |
|
| 173 | - } else { |
|
| 174 | - $this->connection = memcache_pconnect($this->host, $this->port); |
|
| 175 | - } |
|
| 176 | - |
|
| 177 | - if (! $this->connection) { |
|
| 178 | - $error = "Couldn't connect to memcache server"; |
|
| 179 | - |
|
| 180 | - $this->client->getLogger()->error($error); |
|
| 181 | - throw new Google_Cache_Exception($error); |
|
| 182 | - } |
|
| 165 | + if ($this->connection) { |
|
| 166 | + return; |
|
| 167 | + } |
|
| 168 | + |
|
| 169 | + if (class_exists("Memcached")) { |
|
| 170 | + $this->mc = new Memcached(); |
|
| 171 | + $this->mc->addServer($this->host, $this->port); |
|
| 172 | + $this->connection = true; |
|
| 173 | + } else { |
|
| 174 | + $this->connection = memcache_pconnect($this->host, $this->port); |
|
| 175 | + } |
|
| 176 | + |
|
| 177 | + if (! $this->connection) { |
|
| 178 | + $error = "Couldn't connect to memcache server"; |
|
| 179 | + |
|
| 180 | + $this->client->getLogger()->error($error); |
|
| 181 | + throw new Google_Cache_Exception($error); |
|
| 182 | + } |
|
| 183 | 183 | } |
| 184 | 184 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | 18 | if (!class_exists('Google_Client')) { |
| 19 | - require_once dirname(__FILE__) . '/../autoload.php'; |
|
| 19 | + require_once dirname(__FILE__).'/../autoload.php'; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | $this->connection = memcache_pconnect($this->host, $this->port); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - if (! $this->connection) { |
|
| 177 | + if (!$this->connection) { |
|
| 178 | 178 | $error = "Couldn't connect to memcache server"; |
| 179 | 179 | |
| 180 | 180 | $this->client->getLogger()->error($error); |
@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | - * @inheritDoc |
|
| 35 | - */ |
|
| 34 | + * @inheritDoc |
|
| 35 | + */ |
|
| 36 | 36 | public function get($key, $expiration = false) |
| 37 | 37 | { |
| 38 | - return false; |
|
| 38 | + return false; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function set($key, $value) |
| 45 | 45 | { |
| 46 | - // Nop. |
|
| 46 | + // Nop. |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -52,6 +52,6 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function delete($key) |
| 54 | 54 | { |
| 55 | - // Nop. |
|
| 55 | + // Nop. |
|
| 56 | 56 | } |
| 57 | 57 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | 18 | if (!class_exists('Google_Client')) { |
| 19 | - require_once dirname(__FILE__) . '/../autoload.php'; |
|
| 19 | + require_once dirname(__FILE__).'/../autoload.php'; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |