Overview

Namespaces

  • PHP
  • Saklient
    • Cloud
      • Enums
      • Errors
      • Models
      • Resources
    • Errors

Classes

  • Model_Appliance
  • Model_Archive
  • Model_Bridge
  • Model_Disk
  • Model_DiskPlan
  • Model_Icon
  • Model_Iface
  • Model_Ipv6Net
  • Model_IsoImage
  • Model_License
  • Model_LicenseInfo
  • Model_Region
  • Model_Router
  • Model_RouterPlan
  • Model_Script
  • Model_Server
  • Model_ServerPlan
  • Model_Swytch
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: namespace Saklient\Cloud\Models;
  4: 
  5: require_once __DIR__ . "/../../../Saklient/Cloud/Client.php";
  6: use \Saklient\Cloud\Client;
  7: require_once __DIR__ . "/../../../Saklient/Cloud/Models/Model.php";
  8: use \Saklient\Cloud\Models\Model;
  9: require_once __DIR__ . "/../../../Saklient/Cloud/Resources/Resource.php";
 10: use \Saklient\Cloud\Resources\Resource;
 11: require_once __DIR__ . "/../../../Saklient/Cloud/Resources/Icon.php";
 12: use \Saklient\Cloud\Resources\Icon;
 13: require_once __DIR__ . "/../../../Saklient/Cloud/Enums/EScope.php";
 14: use \Saklient\Cloud\Enums\EScope;
 15: require_once __DIR__ . "/../../../Saklient/Util.php";
 16: use \Saklient\Util;
 17: require_once __DIR__ . "/../../../Saklient/Errors/SaklientException.php";
 18: use \Saklient\Errors\SaklientException;
 19: 
 20: /** アイコンを検索・作成するための機能を備えたクラス。 */
 21: class Model_Icon extends Model {
 22:     
 23:     /**
 24:      * @private
 25:      * @access protected
 26:      * @ignore
 27:      * @return string
 28:      */
 29:     protected function _apiPath()
 30:     {
 31:         return "/icon";
 32:     }
 33:     
 34:     /**
 35:      * @private
 36:      * @access protected
 37:      * @ignore
 38:      * @return string
 39:      */
 40:     protected function _rootKey()
 41:     {
 42:         return "Icon";
 43:     }
 44:     
 45:     /**
 46:      * @private
 47:      * @access protected
 48:      * @ignore
 49:      * @return string
 50:      */
 51:     protected function _rootKeyM()
 52:     {
 53:         return "Icons";
 54:     }
 55:     
 56:     /**
 57:      * @private
 58:      * @access protected
 59:      * @ignore
 60:      * @return string
 61:      */
 62:     protected function _className()
 63:     {
 64:         return "Icon";
 65:     }
 66:     
 67:     /**
 68:      * @private
 69:      * @access protected
 70:      * @ignore
 71:      * @param mixed $obj
 72:      * @param boolean $wrapped=false
 73:      * @return \Saklient\Cloud\Resources\Resource
 74:      */
 75:     protected function _createResourceImpl($obj, $wrapped=false)
 76:     {
 77:         Util::validateArgCount(func_num_args(), 1);
 78:         Util::validateType($wrapped, "boolean");
 79:         return new Icon($this->_client, $obj, $wrapped);
 80:     }
 81:     
 82:     /**
 83:      * 次に取得するリストの開始オフセットを指定します。
 84:      * 
 85:      * @access public
 86:      * @param int $offset オフセット
 87:      * @return \Saklient\Cloud\Models\Model_Icon this
 88:      */
 89:     public function offset($offset)
 90:     {
 91:         Util::validateArgCount(func_num_args(), 1);
 92:         Util::validateType($offset, "int");
 93:         return $this->_offset($offset);
 94:     }
 95:     
 96:     /**
 97:      * 次に取得するリストの上限レコード数を指定します。
 98:      * 
 99:      * @access public
100:      * @param int $count 上限レコード数
101:      * @return \Saklient\Cloud\Models\Model_Icon this
102:      */
103:     public function limit($count)
104:     {
105:         Util::validateArgCount(func_num_args(), 1);
106:         Util::validateType($count, "int");
107:         return $this->_limit($count);
108:     }
109:     
110:     /**
111:      * Web APIのフィルタリング設定を直接指定します。
112:      * 
113:      * @access public
114:      * @param string $key キー
115:      * @param mixed $value 値
116:      * @param boolean $multiple=false valueに配列を与え、OR条件で完全一致検索する場合にtrueを指定します。通常、valueはスカラ値であいまい検索されます。
117:      * @return \Saklient\Cloud\Models\Model_Icon
118:      */
119:     public function filterBy($key, $value, $multiple=false)
120:     {
121:         Util::validateArgCount(func_num_args(), 2);
122:         Util::validateType($key, "string");
123:         Util::validateType($multiple, "boolean");
124:         return $this->_filterBy($key, $value, $multiple);
125:     }
126:     
127:     /**
128:      * 次のリクエストのために設定されているステートをすべて破棄します。
129:      * 
130:      * @access public
131:      * @return \Saklient\Cloud\Models\Model_Icon this
132:      */
133:     public function reset()
134:     {
135:         return $this->_reset();
136:     }
137:     
138:     /**
139:      * 指定したIDを持つ唯一のリソースを取得します。
140:      * 
141:      * @access public
142:      * @param string $id
143:      * @return \Saklient\Cloud\Resources\Icon リソースオブジェクト
144:      */
145:     public function getById($id)
146:     {
147:         Util::validateArgCount(func_num_args(), 1);
148:         Util::validateType($id, "string");
149:         return $this->_getById($id);
150:     }
151:     
152:     /**
153:      * リソースの検索リクエストを実行し、結果をリストで取得します。
154:      * 
155:      * @access public
156:      * @return \Saklient\Cloud\Resources\Icon[] リソースオブジェクトの配列
157:      */
158:     public function find()
159:     {
160:         return $this->_find();
161:     }
162:     
163:     /**
164:      * 指定した文字列を名前に含むリソースに絞り込みます。
165:      * 
166:      * 大文字・小文字は区別されません。
167:      * 半角スペースで区切られた複数の文字列は、それらをすべて含むことが条件とみなされます。
168:      * 
169:      * @todo Implement test case
170:      * @access public
171:      * @param string $name
172:      * @return \Saklient\Cloud\Models\Model_Icon
173:      */
174:     public function withNameLike($name)
175:     {
176:         Util::validateArgCount(func_num_args(), 1);
177:         Util::validateType($name, "string");
178:         return $this->_withNameLike($name);
179:     }
180:     
181:     /**
182:      * 指定したタグを持つリソースに絞り込みます。
183:      * 
184:      * 複数のタグを指定する場合は withTags() を利用してください。
185:      * 
186:      * @todo Implement test case
187:      * @access public
188:      * @param string $tag
189:      * @return \Saklient\Cloud\Models\Model_Icon
190:      */
191:     public function withTag($tag)
192:     {
193:         Util::validateArgCount(func_num_args(), 1);
194:         Util::validateType($tag, "string");
195:         return $this->_withTag($tag);
196:     }
197:     
198:     /**
199:      * 指定したすべてのタグを持つリソースに絞り込みます。
200:      * 
201:      * @todo Implement test case
202:      * @access public
203:      * @param string[] $tags
204:      * @return \Saklient\Cloud\Models\Model_Icon
205:      */
206:     public function withTags($tags)
207:     {
208:         Util::validateArgCount(func_num_args(), 1);
209:         Util::validateType($tags, "\\ArrayObject");
210:         return $this->_withTags($tags);
211:     }
212:     
213:     /**
214:      * 指定したDNFに合致するタグを持つリソースに絞り込みます。
215:      * 
216:      * @todo Implement test case
217:      * @access public
218:      * @param string[][] $dnf
219:      * @return \Saklient\Cloud\Models\Model_Icon
220:      */
221:     public function withTagDnf($dnf)
222:     {
223:         Util::validateArgCount(func_num_args(), 1);
224:         Util::validateType($dnf, "\\ArrayObject");
225:         return $this->_withTagDnf($dnf);
226:     }
227:     
228:     /**
229:      * 名前でソートします。
230:      * 
231:      * @todo Implement test case
232:      * @access public
233:      * @param boolean $reverse=false
234:      * @return \Saklient\Cloud\Models\Model_Icon
235:      */
236:     public function sortByName($reverse=false)
237:     {
238:         Util::validateType($reverse, "boolean");
239:         return $this->_sortByName($reverse);
240:     }
241:     
242:     /**
243:      * @ignore
244:      * @access public
245:      * @param \Saklient\Cloud\Client $client
246:      */
247:     public function __construct(\Saklient\Cloud\Client $client)
248:     {
249:         parent::__construct($client);
250:         Util::validateArgCount(func_num_args(), 1);
251:         Util::validateType($client, "\\Saklient\\Cloud\\Client");
252:     }
253:     
254:     /**
255:      * パブリックアイコンに絞り込みます。
256:      * 
257:      * @access public
258:      * @return \Saklient\Cloud\Models\Model_Icon
259:      */
260:     public function withSharedScope()
261:     {
262:         $this->_filterBy("Scope", new \ArrayObject([EScope::shared]));
263:         return $this;
264:     }
265:     
266:     /**
267:      * プライベートアイコンに絞り込みます。
268:      * 
269:      * @access public
270:      * @return \Saklient\Cloud\Models\Model_Icon
271:      */
272:     public function withUserScope()
273:     {
274:         $this->_filterBy("Scope", new \ArrayObject([EScope::user]));
275:         return $this;
276:     }
277:     
278:     
279: 
280: }
281: 
282: 
API documentation generated by ApiGen 2.8.0