[ 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 Webfonts (v1). 20 * 21 * <p> 22 * The Google Fonts Developer API. 23 * </p> 24 * 25 * <p> 26 * For more information about this service, see the API 27 * <a href="https://developers.google.com/fonts/docs/developer_api" target="_blank">Documentation</a> 28 * </p> 29 * 30 * @author Google, Inc. 31 */ 32 class Google_Service_Webfonts extends Google_Service 33 { 34 35 36 public $webfonts; 37 38 39 /** 40 * Constructs the internal representation of the Webfonts service. 41 * 42 * @param Google_Client $client 43 */ 44 public function __construct(Google_Client $client) 45 { 46 parent::__construct($client); 47 $this->servicePath = 'webfonts/v1/'; 48 $this->version = 'v1'; 49 $this->serviceName = 'webfonts'; 50 51 $this->webfonts = new Google_Service_Webfonts_Webfonts_Resource( 52 $this, 53 $this->serviceName, 54 'webfonts', 55 array( 56 'methods' => array( 57 'list' => array( 58 'path' => 'webfonts', 59 'httpMethod' => 'GET', 60 'parameters' => array( 61 'sort' => array( 62 'location' => 'query', 63 'type' => 'string', 64 ), 65 ), 66 ), 67 ) 68 ) 69 ); 70 } 71 } 72 73 74 /** 75 * The "webfonts" collection of methods. 76 * Typical usage is: 77 * <code> 78 * $webfontsService = new Google_Service_Webfonts(...); 79 * $webfonts = $webfontsService->webfonts; 80 * </code> 81 */ 82 class Google_Service_Webfonts_Webfonts_Resource extends Google_Service_Resource 83 { 84 85 /** 86 * Retrieves the list of fonts currently served by the Google Fonts Developer 87 * API (webfonts.listWebfonts) 88 * 89 * @param array $optParams Optional parameters. 90 * 91 * @opt_param string sort 92 * Enables sorting of the list 93 * @return Google_Service_Webfonts_WebfontList 94 */ 95 public function listWebfonts($optParams = array()) 96 { 97 $params = array(); 98 $params = array_merge($params, $optParams); 99 return $this->call('list', array($params), "Google_Service_Webfonts_WebfontList"); 100 } 101 } 102 103 104 105 106 class Google_Service_Webfonts_Webfont extends Google_Collection 107 { 108 protected $collection_key = 'variants'; 109 public $category; 110 public $family; 111 public $files; 112 public $kind; 113 public $lastModified; 114 public $subsets; 115 public $variants; 116 public $version; 117 118 public function setCategory($category) 119 { 120 $this->category = $category; 121 } 122 123 public function getCategory() 124 { 125 return $this->category; 126 } 127 128 public function setFamily($family) 129 { 130 $this->family = $family; 131 } 132 133 public function getFamily() 134 { 135 return $this->family; 136 } 137 138 public function setFiles($files) 139 { 140 $this->files = $files; 141 } 142 143 public function getFiles() 144 { 145 return $this->files; 146 } 147 148 public function setKind($kind) 149 { 150 $this->kind = $kind; 151 } 152 153 public function getKind() 154 { 155 return $this->kind; 156 } 157 158 public function setLastModified($lastModified) 159 { 160 $this->lastModified = $lastModified; 161 } 162 163 public function getLastModified() 164 { 165 return $this->lastModified; 166 } 167 168 public function setSubsets($subsets) 169 { 170 $this->subsets = $subsets; 171 } 172 173 public function getSubsets() 174 { 175 return $this->subsets; 176 } 177 178 public function setVariants($variants) 179 { 180 $this->variants = $variants; 181 } 182 183 public function getVariants() 184 { 185 return $this->variants; 186 } 187 188 public function setVersion($version) 189 { 190 $this->version = $version; 191 } 192 193 public function getVersion() 194 { 195 return $this->version; 196 } 197 } 198 199 class Google_Service_Webfonts_WebfontFiles extends Google_Model 200 { 201 202 } 203 204 class Google_Service_Webfonts_WebfontList extends Google_Collection 205 { 206 protected $collection_key = 'items'; 207 protected $itemsType = 'Google_Service_Webfonts_Webfont'; 208 protected $itemsDataType = 'array'; 209 public $kind; 210 211 public function setItems($items) 212 { 213 $this->items = $items; 214 } 215 216 public function getItems() 217 { 218 return $this->items; 219 } 220 221 public function setKind($kind) 222 { 223 $this->kind = $kind; 224 } 225 226 public function getKind() 227 { 228 return $this->kind; 229 } 230 }
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 |