[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Copyright 2010 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18 /** 19 * Service definition for Pagespeedonline (v1). 20 * 21 * <p> 22 * Lets you analyze the performance of a web page and get tailored suggestions to make that page faster. 23 * </p> 24 * 25 * <p> 26 * For more information about this service, see the API 27 * <a href="https://developers.google.com/speed/docs/insights/v1/getting_started" target="_blank">Documentation</a> 28 * </p> 29 * 30 * @author Google, Inc. 31 */ 32 class Google_Service_Pagespeedonline extends Google_Service 33 { 34 35 36 public $pagespeedapi; 37 38 39 /** 40 * Constructs the internal representation of the Pagespeedonline service. 41 * 42 * @param Google_Client $client 43 */ 44 public function __construct(Google_Client $client) 45 { 46 parent::__construct($client); 47 $this->servicePath = 'pagespeedonline/v1/'; 48 $this->version = 'v1'; 49 $this->serviceName = 'pagespeedonline'; 50 51 $this->pagespeedapi = new Google_Service_Pagespeedonline_Pagespeedapi_Resource( 52 $this, 53 $this->serviceName, 54 'pagespeedapi', 55 array( 56 'methods' => array( 57 'runpagespeed' => array( 58 'path' => 'runPagespeed', 59 'httpMethod' => 'GET', 60 'parameters' => array( 61 'url' => array( 62 'location' => 'query', 63 'type' => 'string', 64 'required' => true, 65 ), 66 'screenshot' => array( 67 'location' => 'query', 68 'type' => 'boolean', 69 ), 70 'locale' => array( 71 'location' => 'query', 72 'type' => 'string', 73 ), 74 'rule' => array( 75 'location' => 'query', 76 'type' => 'string', 77 'repeated' => true, 78 ), 79 'strategy' => array( 80 'location' => 'query', 81 'type' => 'string', 82 ), 83 'filter_third_party_resources' => array( 84 'location' => 'query', 85 'type' => 'boolean', 86 ), 87 ), 88 ), 89 ) 90 ) 91 ); 92 } 93 } 94 95 96 /** 97 * The "pagespeedapi" collection of methods. 98 * Typical usage is: 99 * <code> 100 * $pagespeedonlineService = new Google_Service_Pagespeedonline(...); 101 * $pagespeedapi = $pagespeedonlineService->pagespeedapi; 102 * </code> 103 */ 104 class Google_Service_Pagespeedonline_Pagespeedapi_Resource extends Google_Service_Resource 105 { 106 107 /** 108 * Runs Page Speed analysis on the page at the specified URL, and returns a Page 109 * Speed score, a list of suggestions to make that page faster, and other 110 * information. (pagespeedapi.runpagespeed) 111 * 112 * @param string $url 113 * The URL to fetch and analyze 114 * @param array $optParams Optional parameters. 115 * 116 * @opt_param bool screenshot 117 * Indicates if binary data containing a screenshot should be included 118 * @opt_param string locale 119 * The locale used to localize formatted results 120 * @opt_param string rule 121 * A Page Speed rule to run; if none are given, all rules are run 122 * @opt_param string strategy 123 * The analysis strategy to use 124 * @opt_param bool filter_third_party_resources 125 * Indicates if third party resources should be filtered out before PageSpeed analysis. 126 * @return Google_Service_Pagespeedonline_Result 127 */ 128 public function runpagespeed($url, $optParams = array()) 129 { 130 $params = array('url' => $url); 131 $params = array_merge($params, $optParams); 132 return $this->call('runpagespeed', array($params), "Google_Service_Pagespeedonline_Result"); 133 } 134 } 135 136 137 138 139 class Google_Service_Pagespeedonline_Result extends Google_Collection 140 { 141 protected $collection_key = 'invalidRules'; 142 protected $formattedResultsType = 'Google_Service_Pagespeedonline_ResultFormattedResults'; 143 protected $formattedResultsDataType = ''; 144 public $id; 145 public $invalidRules; 146 public $kind; 147 protected $pageStatsType = 'Google_Service_Pagespeedonline_ResultPageStats'; 148 protected $pageStatsDataType = ''; 149 public $responseCode; 150 public $score; 151 protected $screenshotType = 'Google_Service_Pagespeedonline_ResultScreenshot'; 152 protected $screenshotDataType = ''; 153 public $title; 154 protected $versionType = 'Google_Service_Pagespeedonline_ResultVersion'; 155 protected $versionDataType = ''; 156 157 public function setFormattedResults(Google_Service_Pagespeedonline_ResultFormattedResults $formattedResults) 158 { 159 $this->formattedResults = $formattedResults; 160 } 161 162 public function getFormattedResults() 163 { 164 return $this->formattedResults; 165 } 166 167 public function setId($id) 168 { 169 $this->id = $id; 170 } 171 172 public function getId() 173 { 174 return $this->id; 175 } 176 177 public function setInvalidRules($invalidRules) 178 { 179 $this->invalidRules = $invalidRules; 180 } 181 182 public function getInvalidRules() 183 { 184 return $this->invalidRules; 185 } 186 187 public function setKind($kind) 188 { 189 $this->kind = $kind; 190 } 191 192 public function getKind() 193 { 194 return $this->kind; 195 } 196 197 public function setPageStats(Google_Service_Pagespeedonline_ResultPageStats $pageStats) 198 { 199 $this->pageStats = $pageStats; 200 } 201 202 public function getPageStats() 203 { 204 return $this->pageStats; 205 } 206 207 public function setResponseCode($responseCode) 208 { 209 $this->responseCode = $responseCode; 210 } 211 212 public function getResponseCode() 213 { 214 return $this->responseCode; 215 } 216 217 public function setScore($score) 218 { 219 $this->score = $score; 220 } 221 222 public function getScore() 223 { 224 return $this->score; 225 } 226 227 public function setScreenshot(Google_Service_Pagespeedonline_ResultScreenshot $screenshot) 228 { 229 $this->screenshot = $screenshot; 230 } 231 232 public function getScreenshot() 233 { 234 return $this->screenshot; 235 } 236 237 public function setTitle($title) 238 { 239 $this->title = $title; 240 } 241 242 public function getTitle() 243 { 244 return $this->title; 245 } 246 247 public function setVersion(Google_Service_Pagespeedonline_ResultVersion $version) 248 { 249 $this->version = $version; 250 } 251 252 public function getVersion() 253 { 254 return $this->version; 255 } 256 } 257 258 class Google_Service_Pagespeedonline_ResultFormattedResults extends Google_Model 259 { 260 public $locale; 261 protected $ruleResultsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElement'; 262 protected $ruleResultsDataType = 'map'; 263 264 public function setLocale($locale) 265 { 266 $this->locale = $locale; 267 } 268 269 public function getLocale() 270 { 271 return $this->locale; 272 } 273 274 public function setRuleResults($ruleResults) 275 { 276 $this->ruleResults = $ruleResults; 277 } 278 279 public function getRuleResults() 280 { 281 return $this->ruleResults; 282 } 283 } 284 285 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResults extends Google_Model 286 { 287 288 } 289 290 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElement extends Google_Collection 291 { 292 protected $collection_key = 'urlBlocks'; 293 public $localizedRuleName; 294 public $ruleImpact; 295 protected $urlBlocksType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocks'; 296 protected $urlBlocksDataType = 'array'; 297 298 public function setLocalizedRuleName($localizedRuleName) 299 { 300 $this->localizedRuleName = $localizedRuleName; 301 } 302 303 public function getLocalizedRuleName() 304 { 305 return $this->localizedRuleName; 306 } 307 308 public function setRuleImpact($ruleImpact) 309 { 310 $this->ruleImpact = $ruleImpact; 311 } 312 313 public function getRuleImpact() 314 { 315 return $this->ruleImpact; 316 } 317 318 public function setUrlBlocks($urlBlocks) 319 { 320 $this->urlBlocks = $urlBlocks; 321 } 322 323 public function getUrlBlocks() 324 { 325 return $this->urlBlocks; 326 } 327 } 328 329 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocks extends Google_Collection 330 { 331 protected $collection_key = 'urls'; 332 protected $headerType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksHeader'; 333 protected $headerDataType = ''; 334 protected $urlsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrls'; 335 protected $urlsDataType = 'array'; 336 337 public function setHeader(Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksHeader $header) 338 { 339 $this->header = $header; 340 } 341 342 public function getHeader() 343 { 344 return $this->header; 345 } 346 347 public function setUrls($urls) 348 { 349 $this->urls = $urls; 350 } 351 352 public function getUrls() 353 { 354 return $this->urls; 355 } 356 } 357 358 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksHeader extends Google_Collection 359 { 360 protected $collection_key = 'args'; 361 protected $argsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksHeaderArgs'; 362 protected $argsDataType = 'array'; 363 public $format; 364 365 public function setArgs($args) 366 { 367 $this->args = $args; 368 } 369 370 public function getArgs() 371 { 372 return $this->args; 373 } 374 375 public function setFormat($format) 376 { 377 $this->format = $format; 378 } 379 380 public function getFormat() 381 { 382 return $this->format; 383 } 384 } 385 386 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksHeaderArgs extends Google_Model 387 { 388 public $type; 389 public $value; 390 391 public function setType($type) 392 { 393 $this->type = $type; 394 } 395 396 public function getType() 397 { 398 return $this->type; 399 } 400 401 public function setValue($value) 402 { 403 $this->value = $value; 404 } 405 406 public function getValue() 407 { 408 return $this->value; 409 } 410 } 411 412 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrls extends Google_Collection 413 { 414 protected $collection_key = 'details'; 415 protected $detailsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsDetails'; 416 protected $detailsDataType = 'array'; 417 protected $resultType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsResult'; 418 protected $resultDataType = ''; 419 420 public function setDetails($details) 421 { 422 $this->details = $details; 423 } 424 425 public function getDetails() 426 { 427 return $this->details; 428 } 429 430 public function setResult(Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsResult $result) 431 { 432 $this->result = $result; 433 } 434 435 public function getResult() 436 { 437 return $this->result; 438 } 439 } 440 441 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsDetails extends Google_Collection 442 { 443 protected $collection_key = 'args'; 444 protected $argsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsDetailsArgs'; 445 protected $argsDataType = 'array'; 446 public $format; 447 448 public function setArgs($args) 449 { 450 $this->args = $args; 451 } 452 453 public function getArgs() 454 { 455 return $this->args; 456 } 457 458 public function setFormat($format) 459 { 460 $this->format = $format; 461 } 462 463 public function getFormat() 464 { 465 return $this->format; 466 } 467 } 468 469 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsDetailsArgs extends Google_Model 470 { 471 public $type; 472 public $value; 473 474 public function setType($type) 475 { 476 $this->type = $type; 477 } 478 479 public function getType() 480 { 481 return $this->type; 482 } 483 484 public function setValue($value) 485 { 486 $this->value = $value; 487 } 488 489 public function getValue() 490 { 491 return $this->value; 492 } 493 } 494 495 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsResult extends Google_Collection 496 { 497 protected $collection_key = 'args'; 498 protected $argsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsResultArgs'; 499 protected $argsDataType = 'array'; 500 public $format; 501 502 public function setArgs($args) 503 { 504 $this->args = $args; 505 } 506 507 public function getArgs() 508 { 509 return $this->args; 510 } 511 512 public function setFormat($format) 513 { 514 $this->format = $format; 515 } 516 517 public function getFormat() 518 { 519 return $this->format; 520 } 521 } 522 523 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsResultArgs extends Google_Model 524 { 525 public $type; 526 public $value; 527 528 public function setType($type) 529 { 530 $this->type = $type; 531 } 532 533 public function getType() 534 { 535 return $this->type; 536 } 537 538 public function setValue($value) 539 { 540 $this->value = $value; 541 } 542 543 public function getValue() 544 { 545 return $this->value; 546 } 547 } 548 549 class Google_Service_Pagespeedonline_ResultPageStats extends Google_Model 550 { 551 public $cssResponseBytes; 552 public $flashResponseBytes; 553 public $htmlResponseBytes; 554 public $imageResponseBytes; 555 public $javascriptResponseBytes; 556 public $numberCssResources; 557 public $numberHosts; 558 public $numberJsResources; 559 public $numberResources; 560 public $numberStaticResources; 561 public $otherResponseBytes; 562 public $textResponseBytes; 563 public $totalRequestBytes; 564 565 public function setCssResponseBytes($cssResponseBytes) 566 { 567 $this->cssResponseBytes = $cssResponseBytes; 568 } 569 570 public function getCssResponseBytes() 571 { 572 return $this->cssResponseBytes; 573 } 574 575 public function setFlashResponseBytes($flashResponseBytes) 576 { 577 $this->flashResponseBytes = $flashResponseBytes; 578 } 579 580 public function getFlashResponseBytes() 581 { 582 return $this->flashResponseBytes; 583 } 584 585 public function setHtmlResponseBytes($htmlResponseBytes) 586 { 587 $this->htmlResponseBytes = $htmlResponseBytes; 588 } 589 590 public function getHtmlResponseBytes() 591 { 592 return $this->htmlResponseBytes; 593 } 594 595 public function setImageResponseBytes($imageResponseBytes) 596 { 597 $this->imageResponseBytes = $imageResponseBytes; 598 } 599 600 public function getImageResponseBytes() 601 { 602 return $this->imageResponseBytes; 603 } 604 605 public function setJavascriptResponseBytes($javascriptResponseBytes) 606 { 607 $this->javascriptResponseBytes = $javascriptResponseBytes; 608 } 609 610 public function getJavascriptResponseBytes() 611 { 612 return $this->javascriptResponseBytes; 613 } 614 615 public function setNumberCssResources($numberCssResources) 616 { 617 $this->numberCssResources = $numberCssResources; 618 } 619 620 public function getNumberCssResources() 621 { 622 return $this->numberCssResources; 623 } 624 625 public function setNumberHosts($numberHosts) 626 { 627 $this->numberHosts = $numberHosts; 628 } 629 630 public function getNumberHosts() 631 { 632 return $this->numberHosts; 633 } 634 635 public function setNumberJsResources($numberJsResources) 636 { 637 $this->numberJsResources = $numberJsResources; 638 } 639 640 public function getNumberJsResources() 641 { 642 return $this->numberJsResources; 643 } 644 645 public function setNumberResources($numberResources) 646 { 647 $this->numberResources = $numberResources; 648 } 649 650 public function getNumberResources() 651 { 652 return $this->numberResources; 653 } 654 655 public function setNumberStaticResources($numberStaticResources) 656 { 657 $this->numberStaticResources = $numberStaticResources; 658 } 659 660 public function getNumberStaticResources() 661 { 662 return $this->numberStaticResources; 663 } 664 665 public function setOtherResponseBytes($otherResponseBytes) 666 { 667 $this->otherResponseBytes = $otherResponseBytes; 668 } 669 670 public function getOtherResponseBytes() 671 { 672 return $this->otherResponseBytes; 673 } 674 675 public function setTextResponseBytes($textResponseBytes) 676 { 677 $this->textResponseBytes = $textResponseBytes; 678 } 679 680 public function getTextResponseBytes() 681 { 682 return $this->textResponseBytes; 683 } 684 685 public function setTotalRequestBytes($totalRequestBytes) 686 { 687 $this->totalRequestBytes = $totalRequestBytes; 688 } 689 690 public function getTotalRequestBytes() 691 { 692 return $this->totalRequestBytes; 693 } 694 } 695 696 class Google_Service_Pagespeedonline_ResultScreenshot extends Google_Model 697 { 698 public $data; 699 public $height; 700 public $mimeType; 701 public $width; 702 703 public function setData($data) 704 { 705 $this->data = $data; 706 } 707 708 public function getData() 709 { 710 return $this->data; 711 } 712 713 public function setHeight($height) 714 { 715 $this->height = $height; 716 } 717 718 public function getHeight() 719 { 720 return $this->height; 721 } 722 723 public function setMimeType($mimeType) 724 { 725 $this->mimeType = $mimeType; 726 } 727 728 public function getMimeType() 729 { 730 return $this->mimeType; 731 } 732 733 public function setWidth($width) 734 { 735 $this->width = $width; 736 } 737 738 public function getWidth() 739 { 740 return $this->width; 741 } 742 } 743 744 class Google_Service_Pagespeedonline_ResultVersion extends Google_Model 745 { 746 public $major; 747 public $minor; 748 749 public function setMajor($major) 750 { 751 $this->major = $major; 752 } 753 754 public function getMajor() 755 { 756 return $this->major; 757 } 758 759 public function setMinor($minor) 760 { 761 $this->minor = $minor; 762 } 763 764 public function getMinor() 765 { 766 return $this->minor; 767 } 768 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |