code
stringlengths 17
296k
| docstring
stringlengths 30
30.3k
| func_name
stringlengths 1
89
| language
stringclasses 1
value | repo
stringlengths 7
63
| path
stringlengths 7
153
| url
stringlengths 51
209
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
private function __initClient($accessKeyId, $accessKeySecret, $endpoint, $isCName = false, $securityToken = NULL, $requestProxy = NULL)
{
$accessKeyId = trim($accessKeyId);
$accessKeySecret = trim($accessKeySecret);
$endpoint = trim(trim($endpoint), "/");
if (empty($accessKeyId)) {
throw new OssException("access key id is empty");
}
if (empty($accessKeySecret)) {
throw new OssException("access key secret is empty");
}
$provider = new StaticCredentialsProvider($accessKeyId,$accessKeySecret,$securityToken);
$config = array(
'endpoint' => $endpoint,
'cname' => $isCName,
'request_proxy' => $requestProxy,
'provider' => $provider
);
$this->__initNewClient($config);
} | There're a few different ways to create an OssClient object:
1. Most common one from access Id, access Key and the endpoint: $ossClient = new OssClient($id, $key, $endpoint)
2. If the endpoint is the CName (such as www.testoss.com, make sure it's CName binded in the OSS console),
uses $ossClient = new OssClient($id, $key, $endpoint, true)
3. If using Alicloud's security token service (STS), then the AccessKeyId, AccessKeySecret and STS token are all got from STS.
Use this: $ossClient = new OssClient($id, $key, $endpoint, false, $token)
4. If the endpoint is in IP format, you could use this: $ossClient = new OssClient($id, $key, “1.2.3.4:8900”)
@param string $accessKeyId The AccessKeyId from OSS or STS
@param string $accessKeySecret The AccessKeySecret from OSS or STS
@param string $endpoint The domain name of the datacenter,For example: oss-cn-hangzhou.aliyuncs.com
@param boolean $isCName If this is the CName and binded in the bucket.
@param string $securityToken from STS.
@param string $requestProxy
@throws OssException | __initClient | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function listBuckets($options = NULL)
{
if ($this->hostType === self::OSS_HOST_TYPE_CNAME) {
throw new OssException("operation is not permitted with CName host");
}
$this->precheckOptions($options);
$options[self::OSS_BUCKET] = '';
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$response = $this->auth($options);
$result = new ListBucketsResult($response);
return $result->getData();
} | Lists the Bucket [GetService]. Not applicable if the endpoint is CName (because CName must be binded to a specific bucket).
@param array $options
@throws OssException
@return BucketListInfo | listBuckets | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function createBucket($bucket, $acl = self::OSS_ACL_TYPE_PRIVATE, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_HEADERS] = array(self::OSS_ACL => $acl);
if (isset($options[self::OSS_STORAGE])) {
$this->precheckStorage($options[self::OSS_STORAGE]);
$options[self::OSS_CONTENT] = OssUtil::createBucketXmlBody($options[self::OSS_STORAGE]);
unset($options[self::OSS_STORAGE]);
}
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Creates bucket,The ACL of the bucket created by default is OssClient::OSS_ACL_TYPE_PRIVATE
@param string $bucket
@param string $acl
@param array $options
@param string $storageType
@return null | createBucket | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function deleteBucket($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_DELETE;
$options[self::OSS_OBJECT] = '/';
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Deletes bucket
The deletion will not succeed if the bucket is not empty (either has objects or parts)
To delete a bucket, all its objects and parts must be deleted first.
@param string $bucket
@param array $options
@return null | deleteBucket | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketLocation($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'location';
$response = $this->auth($options);
$result = new GetLocationResult($response);
return $result->getData();
} | Get the data center location information for the bucket
@param string $bucket
@param array $options
@throws OssException
@return string | getBucketLocation | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketMeta($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_HEAD;
$options[self::OSS_OBJECT] = '/';
$response = $this->auth($options);
$result = new HeaderResult($response);
return $result->getData();
} | Get the Meta information for the Bucket
@param string $bucket
@param array $options Refer to the SDK documentation
@return array | getBucketMeta | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketLogging($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'logging';
$response = $this->auth($options);
$result = new GetLoggingResult($response);
return $result->getData();
} | Gets the bucket logging config
@param string $bucket bucket name
@param array $options by default is empty
@throws OssException
@return LoggingConfig | getBucketLogging | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function putBucketLogging($bucket, $targetBucket, $targetPrefix, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$this->precheckBucket($targetBucket, 'targetbucket is not allowed empty');
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'logging';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$loggingConfig = new LoggingConfig($targetBucket, $targetPrefix);
$options[self::OSS_CONTENT] = $loggingConfig->serializeToXml();
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Sets the bycket logging config. Only owner can call this API.
@param string $bucket bucket name
@param string $targetBucket The logging file's bucket
@param string $targetPrefix The logging file's prefix
@param array $options By default is empty.
@throws OssException
@return null | putBucketLogging | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function deleteBucketLogging($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_DELETE;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'logging';
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Deletes the bucket logging config
@param string $bucket bucket name
@param array $options
@throws OssException
@return null | deleteBucketLogging | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function putBucketWebsite($bucket, $websiteConfig, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'website';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$options[self::OSS_CONTENT] = $websiteConfig->serializeToXml();
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Sets the website config in bucket---that is could make the bucket as a static website once the CName is binded.
@param string $bucket bucket name
@param WebsiteConfig $websiteConfig
@param array $options
@throws OssException
@return null | putBucketWebsite | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketWebsite($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'website';
$response = $this->auth($options);
$result = new GetWebsiteResult($response);
return $result->getData();
} | Gets the website config in the bucket
@param string $bucket bucket name
@param array $options
@throws OssException
@return WebsiteConfig | getBucketWebsite | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function deleteBucketWebsite($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_DELETE;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'website';
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Deletes the website config in the bucket
@param string $bucket bucket name
@param array $options
@throws OssException
@return null | deleteBucketWebsite | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function putBucketCors($bucket, $corsConfig, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'cors';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$options[self::OSS_CONTENT] = $corsConfig->serializeToXml();
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Sets the cross-origin-resource-sharing (CORS) rule. It would overwrite the originl one.
@param string $bucket bucket name
@param CorsConfig $corsConfig CORS config. Check out the details from OSS API document
@param array $options array
@throws OssException
@return null | putBucketCors | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function deleteBucketCors($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_DELETE;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'cors';
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Deletes the bucket's CORS config and disable the CORS on the bucket.
@param string $bucket bucket name
@param array $options
@throws OssException
@return null | deleteBucketCors | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketCname($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_CNAME] = '';
$response = $this->auth($options);
$result = new GetCnameResult($response);
return $result->getData();
} | Gets the binded CName list of the bucket
@param string $bucket bucket name
@param array $options
@throws OssException
@return CnameConfig | getBucketCname | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function deleteBucketCname($bucket, $cname, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_POST;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$cnameConfig = new CnameConfig();
$cnameConfig->addCname($cname);
$options[self::OSS_CONTENT] = $cnameConfig->serializeToXml();
$options[self::OSS_COMP] = 'delete';
$options[self::OSS_CNAME] = '';
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Remove a CName binding from the bucket
@param string $bucket bucket name
@param CnameConfig $cnameConfig
@param array $options
@throws OssException
@return null | deleteBucketCname | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function createBucketCnameToken($bucket, $cname, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_POST;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$cnameConfig = new CnameConfig();
$cnameConfig->addCname($cname);
$options[self::OSS_CONTENT] = $cnameConfig->serializeToXml();
$options[self::OSS_COMP] = 'token';
$options[self::OSS_CNAME] = '';
$response = $this->auth($options);
$result = new CreateBucketCnameTokenResult($response);
return $result->getData();
} | create a cname token for a bucket
@param string $bucket bucket name
@param array $options
@throws OssException
@return CnameToken | createBucketCnameToken | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketCnameToken($bucket, $cname, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_COMP] = 'token';
$options[self::OSS_CNAME] = $cname;
$response = $this->auth($options);
$result = new GetBucketCnameTokenResult($response);
return $result->getData();
} | get a cname token for a bucket
@param string $bucket bucket name
@param array $options
@throws OssException
@return CnameToken | getBucketCnameToken | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function putBucketLiveChannel($bucket, $channelName, $channelConfig, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = $channelName;
$options[self::OSS_SUB_RESOURCE] = 'live';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$options[self::OSS_CONTENT] = $channelConfig->serializeToXml();
$response = $this->auth($options);
$result = new PutLiveChannelResult($response);
$info = $result->getData();
$info->setName($channelName);
$info->setDescription($channelConfig->getDescription());
return $info;
} | Creates a Live Channel under a bucket
@param string $bucket bucket name
@param string channelName $channelName
@param LiveChannelConfig $channelConfig
@param array $options
@throws OssException
@return LiveChannelInfo | putBucketLiveChannel | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getLiveChannelInfo($bucket, $channelName, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = $channelName;
$options[self::OSS_SUB_RESOURCE] = 'live';
$response = $this->auth($options);
$result = new GetLiveChannelInfoResult($response);
return $result->getData();
} | Gets the LiveChannel information by the channel name
@param string $bucket bucket name
@param string channelName $channelName
@param array $options
@throws OssException
@return GetLiveChannelInfo | getLiveChannelInfo | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getLiveChannelStatus($bucket, $channelName, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = $channelName;
$options[self::OSS_SUB_RESOURCE] = 'live';
$options[self::OSS_COMP] = 'stat';
$response = $this->auth($options);
$result = new GetLiveChannelStatusResult($response);
return $result->getData();
} | Gets the status of LiveChannel
@param string $bucket bucket name
@param string channelName $channelName
@param array $options
@throws OssException
@return GetLiveChannelStatus | getLiveChannelStatus | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getLiveChannelHistory($bucket, $channelName, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = $channelName;
$options[self::OSS_SUB_RESOURCE] = 'live';
$options[self::OSS_COMP] = 'history';
$response = $this->auth($options);
$result = new GetLiveChannelHistoryResult($response);
return $result->getData();
} | Gets the LiveChannel pushing streaming record
@param string $bucket bucket name
@param string channelName $channelName
@param array $options
@throws OssException
@return GetLiveChannelHistory | getLiveChannelHistory | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function listBucketLiveChannels($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'live';
$options[self::OSS_QUERY_STRING] = array(
'prefix' => isset($options['prefix']) ? $options['prefix'] : '',
'marker' => isset($options['marker']) ? $options['marker'] : '',
'max-keys' => isset($options['max-keys']) ? $options['max-keys'] : '',
);
$response = $this->auth($options);
$result = new ListLiveChannelResult($response);
$list = $result->getData();
$list->setBucketName($bucket);
return $list;
} | Gets the live channel list under a bucket.
@param string $bucket bucket name
@param array $options
@throws OssException
@return LiveChannelListInfo | listBucketLiveChannels | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function postVodPlaylist($bucket, $channelName, $playlistName, $setTime)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_POST;
$options[self::OSS_OBJECT] = $channelName . '/' . $playlistName;
$options[self::OSS_SUB_RESOURCE] = 'vod';
$options[self::OSS_LIVE_CHANNEL_END_TIME] = $setTime['EndTime'];
$options[self::OSS_LIVE_CHANNEL_START_TIME] = $setTime['StartTime'];
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Creates a play list file for the LiveChannel
@param string $bucket bucket name
@param string channelName $channelName
@param string $playlistName The playlist name, must end with ".m3u8".
@param array $setTime startTime and EndTime in unix time. No more than 1 day.
@throws OssException
@return null | postVodPlaylist | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function deleteBucketLiveChannel($bucket, $channelName, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_DELETE;
$options[self::OSS_OBJECT] = $channelName;
$options[self::OSS_SUB_RESOURCE] = 'live';
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Deletes the Bucket LiveChannel
@param string $bucket bucket name
@param string channelName $channelName
@param array $options
@throws OssException
@return null | deleteBucketLiveChannel | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function optionsObject($bucket, $object, $origin, $request_method, $request_headers, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_OPTIONS;
$options[self::OSS_OBJECT] = $object;
$options[self::OSS_HEADERS] = array(
self::OSS_OPTIONS_ORIGIN => $origin,
self::OSS_OPTIONS_REQUEST_HEADERS => $request_headers,
self::OSS_OPTIONS_REQUEST_METHOD => $request_method
);
$response = $this->auth($options);
$result = new HeaderResult($response);
return $result->getData();
} | Precheck the CORS request. Before sending a CORS request, a preflight request (OPTIONS) is sent with the specific origin.
HTTP METHOD and headers information are sent to OSS as well for evaluating if the CORS request is allowed.
Note: OSS could enable the CORS on the bucket by calling putBucketCors. Once CORS is enabled, the OSS could evaluate accordingto the preflight request.
@param string $bucket bucket name
@param string $object object name
@param string $origin the origin of the request
@param string $request_method The actual HTTP method which will be used in CORS request
@param string $request_headers The actual HTTP headers which will be used in CORS request
@param array $options
@return array
@throws OssException
@link http://help.aliyun.com/document_detail/oss/api-reference/cors/OptionObject.html | optionsObject | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function putBucketLifecycle($bucket, $lifecycleConfig, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'lifecycle';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$options[self::OSS_CONTENT] = $lifecycleConfig->serializeToXml();
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Sets the bucket's lifecycle config
@param string $bucket bucket name
@param LifecycleConfig $lifecycleConfig LifecycleConfig instance
@param array $options
@throws OssException
@return null | putBucketLifecycle | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketLifecycle($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'lifecycle';
$response = $this->auth($options);
$result = new GetLifecycleResult($response);
return $result->getData();
} | Gets bucket's lifecycle config
@param string $bucket bucket name
@param array $options
@throws OssException
@return LifecycleConfig | getBucketLifecycle | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function deleteBucketLifecycle($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_DELETE;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'lifecycle';
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Deletes the bucket's lifecycle config
@param string $bucket bucket name
@param array $options
@throws OssException
@return null | deleteBucketLifecycle | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function putBucketReferer($bucket, $refererConfig, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'referer';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$options[self::OSS_CONTENT] = $refererConfig->serializeToXml();
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Sets a bucket's referer, which has a whitelist of referrer and specifies if empty referer is allowed.
Checks out API document for more details about "Bucket Referer"
@param string $bucket bucket name
@param RefererConfig $refererConfig
@param array $options
@return ResponseCore
@throws null | putBucketReferer | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketReferer($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'referer';
$response = $this->auth($options);
$result = new GetRefererResult($response);
return $result->getData();
} | Gets the bucket's Referer
Checks out API document for more details about "Bucket Referer"
@param string $bucket bucket name
@param array $options
@throws OssException
@return RefererConfig | getBucketReferer | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function putBucketStorageCapacity($bucket, $storageCapacity, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'qos';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$storageCapacityConfig = new StorageCapacityConfig($storageCapacity);
$options[self::OSS_CONTENT] = $storageCapacityConfig->serializeToXml();
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Set the size of the bucket,the unit is GB
When the capacity of the bucket is bigger than the set, it's forbidden to continue writing
@param string $bucket bucket name
@param int $storageCapacity
@param array $options
@return ResponseCore
@throws null | putBucketStorageCapacity | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketStorageCapacity($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'qos';
$response = $this->auth($options);
$result = new GetStorageCapacityResult($response);
return $result->getData();
} | Get the capacity of the bucket, the unit is GB
@param string $bucket bucket name
@param array $options
@throws OssException
@return int | getBucketStorageCapacity | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketInfo($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'bucketInfo';
$response = $this->auth($options);
$result = new GetBucketInfoResult($response);
return $result->getData();
} | Get the information of the bucket
@param string $bucket bucket name
@param array $options
@throws OssException
@return BucketInfo | getBucketInfo | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function deleteBucketEncryption($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_DELETE;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'encryption';
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Deletes the bucket's encryption
@param string $bucket bucket name
@param array $options
@throws OssException
@return null | deleteBucketEncryption | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function putBucketRequestPayment($bucket, $payer, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'requestPayment';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$config = new RequestPaymentConfig($payer);
$options[self::OSS_CONTENT] = $config->serializeToXml();
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Set the request playment of the bucket, Can be BucketOwner and Requester
@param string $bucket bucket name
@param string $payer
@param array $options
@return ResponseCore
@throws null | putBucketRequestPayment | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketRequestPayment($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'requestPayment';
$response = $this->auth($options);
$result = new GetBucketRequestPaymentResult($response);
return $result->getData();
} | Get the request playment of the bucket
@param string $bucket bucket name
@param array $options
@throws OssException
@return string | getBucketRequestPayment | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function putBucketVersioning($bucket, $status, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'versioning';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$config = new VersioningConfig($status);
$options[self::OSS_CONTENT] = $config->serializeToXml();
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Set the versioning of the bucket, Can be BucketOwner and Requester
@param string $bucket bucket name
@param string $status
@param array $options
@return ResponseCore
@throws null | putBucketVersioning | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketVersioning($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'versioning';
$response = $this->auth($options);
$result = new GetBucketVersioningResult($response);
return $result->getData();
} | Get the versioning of the bucket
@param string $bucket bucket name
@param array $options
@throws OssException
@return string | getBucketVersioning | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function putBucketTransferAcceleration($bucket,$enabled,$options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'transferAcceleration';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$config = new TransferAccelerationConfig();
$config->setEnabled($enabled);
$options[self::OSS_CONTENT] = $config->serializeToXml();
$response = $this->auth($options);
$result = new HeaderResult($response);
return $result->getData();
} | Put Bucket TransferAcceleration
@param $bucket
@param $enabled boolean
@param null $options
@return null
@throws OssException | putBucketTransferAcceleration | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBucketTransferAcceleration($bucket,$options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'transferAcceleration';
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$response = $this->auth($options);
$result = new GetBucketTransferAccelerationResult($response);
return $result->getData();
} | Put Bucket TransferAcceleration
@param $bucket
@param null $options
@return enabled boolean
@throws OssException | getBucketTransferAcceleration | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function listObjects($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$query = isset($options[self::OSS_QUERY_STRING]) ? $options[self::OSS_QUERY_STRING] : array();
$options[self::OSS_QUERY_STRING] = array_merge(
$query,
array(self::OSS_ENCODING_TYPE => self::OSS_ENCODING_TYPE_URL,
self::OSS_DELIMITER => isset($options[self::OSS_DELIMITER]) ? $options[self::OSS_DELIMITER] : '/',
self::OSS_PREFIX => isset($options[self::OSS_PREFIX]) ? $options[self::OSS_PREFIX] : '',
self::OSS_MAX_KEYS => isset($options[self::OSS_MAX_KEYS]) ? $options[self::OSS_MAX_KEYS] : self::OSS_MAX_KEYS_VALUE,
self::OSS_MARKER => isset($options[self::OSS_MARKER]) ? $options[self::OSS_MARKER] : '')
);
$response = $this->auth($options);
$result = new ListObjectsResult($response);
return $result->getData();
} | Lists the bucket's object list (in ObjectListInfo)
@param string $bucket
@param array $options are defined below:
$options = array(
'max-keys' => specifies max object count to return. By default is 100 and max value could be 1000.
'prefix' => specifies the key prefix the returned objects must have. Note that the returned keys still contain the prefix.
'delimiter' => The delimiter of object name for grouping object. When it's specified, listObjects will differeniate the object and folder. And it will return subfolder's objects.
'marker' => The key of returned object must be greater than the 'marker'.
)
Prefix and marker are for filtering and paging. Their length must be less than 256 bytes
@throws OssException
@return ObjectListInfo | listObjects | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function listObjectsV2($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$query = isset($options[self::OSS_QUERY_STRING]) ? $options[self::OSS_QUERY_STRING] : array();
$temp = array(
self::OSS_LIST_TYPE=>2,
self::OSS_ENCODING_TYPE => self::OSS_ENCODING_TYPE_URL,
self::OSS_DELIMITER => isset($options[self::OSS_DELIMITER]) ? $options[self::OSS_DELIMITER] : '/',
self::OSS_PREFIX => isset($options[self::OSS_PREFIX]) ? $options[self::OSS_PREFIX] : '',
self::OSS_MAX_KEYS => isset($options[self::OSS_MAX_KEYS]) ? $options[self::OSS_MAX_KEYS] : self::OSS_MAX_KEYS_VALUE,
self::OSS_START_AFTER => isset($options[self::OSS_START_AFTER]) ? $options[self::OSS_START_AFTER] : '',
);
if(isset($options[self::OSS_CONTINUATION_TOKEN])){
$temp[self::OSS_CONTINUATION_TOKEN] = $options[self::OSS_CONTINUATION_TOKEN];
}
$options[self::OSS_QUERY_STRING] = array_merge(
$query,$temp
);
$response = $this->auth($options);
$result = new ListObjectsV2Result($response);
return $result->getData();
} | Lists the bucket's object list v2 (in ObjectListInfoV2)
@param string $bucket
@param array $options are defined below:
$options = array(
'max-keys' => specifies max object count to return. By default is 100 and max value could be 1000.
'prefix' => specifies the key prefix the returned objects must have. Note that the returned keys still contain the prefix.
'delimiter' => The delimiter of object name for grouping object. When it's specified, listObjects will differeniate the object and folder. And it will return subfolder's objects.
'start-after' => The key of returned object must be greater than the 'start-after'.
'continuation-token' => The token from which the list operation must start.
)
Prefix, start-after and continuation-token are for filtering and paging. Their length must be less than 256 bytes
@throws OssException
@return ObjectListInfoV2 | listObjectsV2 | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function listObjectVersions($bucket, $options = NULL)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'versions';
$query = isset($options[self::OSS_QUERY_STRING]) ? $options[self::OSS_QUERY_STRING] : array();
$options[self::OSS_QUERY_STRING] = array_merge(
$query,
array(self::OSS_ENCODING_TYPE => self::OSS_ENCODING_TYPE_URL,
self::OSS_DELIMITER => isset($options[self::OSS_DELIMITER]) ? $options[self::OSS_DELIMITER] : '/',
self::OSS_PREFIX => isset($options[self::OSS_PREFIX]) ? $options[self::OSS_PREFIX] : '',
self::OSS_MAX_KEYS => isset($options[self::OSS_MAX_KEYS]) ? $options[self::OSS_MAX_KEYS] : self::OSS_MAX_KEYS_VALUE,
self::OSS_KEY_MARKER => isset($options[self::OSS_KEY_MARKER]) ? $options[self::OSS_KEY_MARKER] : '',
self::OSS_VERSION_ID_MARKER => isset($options[self::OSS_VERSION_ID_MARKER]) ? $options[self::OSS_VERSION_ID_MARKER] : '')
);
$response = $this->auth($options);
$result = new ListObjectVersionsResult($response);
return $result->getData();
} | Lists the bucket's object with version information (in ObjectListInfo)
@param string $bucket
@param array $options are defined below:
$options = array(
'max-keys' => specifies max object count to return. By default is 100 and max value could be 1000.
'prefix' => specifies the key prefix the returned objects must have. Note that the returned keys still contain the prefix.
'delimiter' => The delimiter of object name for grouping object. When it's specified, listObjectVersions will differeniate the object and folder. And it will return subfolder's objects.
'key-marker' => The key of returned object must be greater than the 'key-marker'.
'version-id-marker' => The version id of returned object must be greater than the 'version-id-marker'.
)
Prefix and marker are for filtering and paging. Their length must be less than 256 bytes
@throws OssException
@return ObjectListInfo | listObjectVersions | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function createObjectDir($bucket, $object, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = $object . '/';
$options[self::OSS_CONTENT_LENGTH] = array(self::OSS_CONTENT_LENGTH => 0);
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Creates a virtual 'folder' in OSS. The name should not end with '/' because the method will append the name with a '/' anyway.
Internal use only.
@param string $bucket bucket name
@param string $object object name
@param array $options
@return null | createObjectDir | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function putObject($bucket, $object, $content, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
$options[self::OSS_CONTENT] = $content;
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = $object;
if (!isset($options[self::OSS_LENGTH])) {
$options[self::OSS_CONTENT_LENGTH] = strlen($options[self::OSS_CONTENT]);
} else {
$options[self::OSS_CONTENT_LENGTH] = $options[self::OSS_LENGTH];
}
$is_check_md5 = $this->isCheckMD5($options);
if ($is_check_md5) {
$content_md5 = base64_encode(md5($content, true));
$options[self::OSS_CONTENT_MD5] = $content_md5;
}
if (!isset($options[self::OSS_CONTENT_TYPE])) {
$options[self::OSS_CONTENT_TYPE] = $this->getMimeType($object);
}
$response = $this->auth($options);
if (isset($options[self::OSS_CALLBACK]) && !empty($options[self::OSS_CALLBACK])) {
$result = new CallbackResult($response);
} else {
$result = new PutSetDeleteResult($response);
}
return $result->getData();
} | Uploads the $content object to OSS.
@param string $bucket bucket name
@param string $object objcet name
@param string $content The content object
@param array $options
@return null | putObject | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function uploadStream($bucket, $object, $handle, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
if (!is_resource($handle)) {
throw new OssException("The handle must be an opened stream");
}
$options[self::OSS_FILE_UPLOAD] = $handle;
if ($this->isCheckMD5($options)) {
rewind($handle);
$ctx = hash_init('md5');
hash_update_stream($ctx, $handle);
$content_md5 = base64_encode(hash_final($ctx, true));
rewind($handle);
$options[self::OSS_CONTENT_MD5] = $content_md5;
}
if (!isset($options[self::OSS_CONTENT_TYPE])) {
$options[self::OSS_CONTENT_TYPE] = $this->getMimeType($object);
}
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_OBJECT] = $object;
if (!isset($options[self::OSS_CONTENT_LENGTH])) {
$options[self::OSS_CONTENT_LENGTH] = fstat($handle)[self::OSS_SIZE];
}
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Uploads object from file handle
@param string $bucket bucket name
@param string $object object name
@param resource $handle file handle
@param array $options
@return null
@throws OssException | uploadStream | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function appendObject($bucket, $object, $content, $position, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
$options[self::OSS_CONTENT] = $content;
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_POST;
$options[self::OSS_OBJECT] = $object;
$options[self::OSS_SUB_RESOURCE] = 'append';
$options[self::OSS_POSITION] = strval($position);
if (!isset($options[self::OSS_LENGTH])) {
$options[self::OSS_CONTENT_LENGTH] = strlen($options[self::OSS_CONTENT]);
} else {
$options[self::OSS_CONTENT_LENGTH] = $options[self::OSS_LENGTH];
}
$is_check_md5 = $this->isCheckMD5($options);
if ($is_check_md5) {
$content_md5 = base64_encode(md5($content, true));
$options[self::OSS_CONTENT_MD5] = $content_md5;
}
if (!isset($options[self::OSS_CONTENT_TYPE])) {
$options[self::OSS_CONTENT_TYPE] = $this->getMimeType($object);
}
$response = $this->auth($options);
$result = new AppendResult($response);
return $result->getData();
} | Append the object with the content at the specified position.
The specified position is typically the lengh of the current file.
@param string $bucket bucket name
@param string $object objcet name
@param string $content content to append
@param array $options
@return int next append position
@throws OssException | appendObject | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function appendFile($bucket, $object, $file, $position, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
OssUtil::throwOssExceptionWithMessageIfEmpty($file, "file path is invalid");
$file = OssUtil::encodePath($file);
if (!file_exists($file)) {
throw new OssException($file . " file does not exist");
}
$options[self::OSS_FILE_UPLOAD] = $file;
$file_size = sprintf('%u',filesize($options[self::OSS_FILE_UPLOAD]));
$is_check_md5 = $this->isCheckMD5($options);
if ($is_check_md5) {
$content_md5 = base64_encode(md5_file($options[self::OSS_FILE_UPLOAD], true));
$options[self::OSS_CONTENT_MD5] = $content_md5;
}
if (!isset($options[self::OSS_CONTENT_TYPE])) {
$options[self::OSS_CONTENT_TYPE] = $this->getMimeType($object, $file);
}
$options[self::OSS_METHOD] = self::OSS_HTTP_POST;
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_OBJECT] = $object;
$options[self::OSS_CONTENT_LENGTH] = $file_size;
$options[self::OSS_SUB_RESOURCE] = 'append';
$options[self::OSS_POSITION] = strval($position);
$response = $this->auth($options);
$result = new AppendResult($response);
return $result->getData();
} | Append the object with a local file
@param string $bucket bucket name
@param string $object object name
@param string $file The local file path to append with
@param array $options
@return int next append position
@throws OssException | appendFile | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function copyObject($fromBucket, $fromObject, $toBucket, $toObject, $options = NULL)
{
$this->precheckCommon($fromBucket, $fromObject, $options);
$this->precheckCommon($toBucket, $toObject, $options);
$options[self::OSS_BUCKET] = $toBucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_OBJECT] = $toObject;
$param = '/' . $fromBucket . '/' . rawurlencode($fromObject);
if (isset($options[self::OSS_VERSION_ID])) {
$param = $param . '?versionId='.$options[self::OSS_VERSION_ID];
unset($options[self::OSS_VERSION_ID]);
}
if (isset($options[self::OSS_HEADERS])) {
$options[self::OSS_HEADERS][self::OSS_OBJECT_COPY_SOURCE] = $param;
} else {
$options[self::OSS_HEADERS] = array(self::OSS_OBJECT_COPY_SOURCE => $param);
}
$response = $this->auth($options);
$result = new CopyObjectResult($response);
return $result->getData();
} | Copy from an existing OSS object to another OSS object. If the target object exists already, it will be overwritten.
@param string $fromBucket Source bucket name
@param string $fromObject Source object name
@param string $toBucket Target bucket name
@param string $toObject Target object name
@param array $options
@return null
@throws OssException | copyObject | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getSimplifiedObjectMeta($bucket, $object, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_HEAD;
$options[self::OSS_OBJECT] = $object;
$options[self::OSS_SUB_RESOURCE] = 'objectMeta';
$response = $this->auth($options);
$result = new HeaderResult($response);
return $result->getData();
} | Gets the simplified metadata of a object.
Simplified metadata includes ETag, Size, LastModified.
@param string $bucket bucket name
@param string $object object name
@param string $options Checks out the SDK document for the detail
@return array | getSimplifiedObjectMeta | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function doesObjectExist($bucket, $object, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_HEAD;
$options[self::OSS_OBJECT] = $object;
$response = $this->auth($options);
$result = new ExistResult($response);
return $result->getData();
} | Checks if the object exists
It's implemented by getObjectMeta().
@param string $bucket bucket name
@param string $object object name
@param array $options
@return bool True:object exists; False:object does not exist | doesObjectExist | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function restoreObject($bucket, $object, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = self::OSS_HTTP_POST;
$options[self::OSS_OBJECT] = $object;
$options[self::OSS_SUB_RESOURCE] = self::OSS_RESTORE;
if (isset($options[self::OSS_RESTORE_CONFIG])) {
$config = $options[self::OSS_RESTORE_CONFIG];
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
$options[self::OSS_CONTENT] = $config->serializeToXml();
}
$response = $this->auth($options);
$result = new PutSetDeleteResult($response);
return $result->getData();
} | Object reading for Archive type
Use Restore to enable the server to perform the thawing task
@param string $bucket bucket name
@param string $object object name
@return null
@throws OssException | restoreObject | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
private function computePartSize($partSize)
{
$partSize = (integer)$partSize;
if ($partSize <= self::OSS_MIN_PART_SIZE) {
$partSize = self::OSS_MIN_PART_SIZE;
} elseif ($partSize > self::OSS_MAX_PART_SIZE) {
$partSize = self::OSS_MAX_PART_SIZE;
}
return $partSize;
} | Gets the part size according to the preferred part size.
If the specified part size is too small or too big, it will return a min part or max part size instead.
Otherwise returns the specified part size.
@param int $partSize
@return int | computePartSize | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function generateMultiuploadParts($file_size, $partSize = 5242880)
{
$i = 0;
$size_count = $file_size;
$values = array();
$partSize = $this->computePartSize($partSize);
while ($size_count > 0) {
$size_count -= $partSize;
$values[] = array(
self::OSS_SEEK_TO => ($partSize * $i),
self::OSS_LENGTH => (($size_count > 0) ? $partSize : ($size_count + $partSize)),
);
$i++;
}
return $values;
} | Computes the parts count, size and start position according to the file size and the part size.
It must be only called by upload_Part().
@param integer $file_size File size
@param integer $partSize part大小,part size. Default is 5MB
@return array An array contains key-value pairs--the key is `seekTo`and value is `length`. | generateMultiuploadParts | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function initiateMultipartUpload($bucket, $object, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
$options[self::OSS_METHOD] = self::OSS_HTTP_POST;
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_OBJECT] = $object;
$options[self::OSS_SUB_RESOURCE] = 'uploads';
$options[self::OSS_CONTENT] = '';
if (!isset($options[self::OSS_CONTENT_TYPE])) {
$options[self::OSS_CONTENT_TYPE] = $this->getMimeType($object);
}
if (!isset($options[self::OSS_HEADERS])) {
$options[self::OSS_HEADERS] = array();
}
$response = $this->auth($options);
$result = new InitiateMultipartUploadResult($response);
return $result->getData();
} | Initialize a multi-part upload
@param string $bucket bucket name
@param string $object object name
@param array $options Key-Value array
@throws OssException
@return string returns uploadid | initiateMultipartUpload | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function uploadPart($bucket, $object, $uploadId, $options = null)
{
$this->precheckCommon($bucket, $object, $options);
$this->precheckParam($options, self::OSS_FILE_UPLOAD, __FUNCTION__);
$this->precheckParam($options, self::OSS_PART_NUM, __FUNCTION__);
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_OBJECT] = $object;
$options[self::OSS_UPLOAD_ID] = $uploadId;
if (isset($options[self::OSS_LENGTH])) {
$options[self::OSS_CONTENT_LENGTH] = $options[self::OSS_LENGTH];
}
$response = $this->auth($options);
$result = new UploadPartResult($response);
return $result->getData();
} | Upload a part in a multiparts upload.
@param string $bucket bucket name
@param string $object object name
@param string $uploadId
@param array $options Key-Value array
@return string eTag
@throws OssException | uploadPart | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function completeMultipartUpload($bucket, $object, $uploadId, $listParts, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
$options[self::OSS_METHOD] = self::OSS_HTTP_POST;
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_OBJECT] = $object;
$options[self::OSS_UPLOAD_ID] = $uploadId;
$options[self::OSS_CONTENT_TYPE] = 'application/xml';
if (is_array($listParts)) {
$options[self::OSS_CONTENT] = OssUtil::createCompleteMultipartUploadXmlBody($listParts);
} else {
$options[self::OSS_CONTENT] = "";
}
$response = $this->auth($options);
if (isset($options[self::OSS_CALLBACK]) && !empty($options[self::OSS_CALLBACK])) {
$result = new CallbackResult($response);
} else {
$result = new PutSetDeleteResult($response);
}
return $result->getData();
} | Completes a multiparts upload, after all parts are uploaded.
@param string $bucket bucket name
@param string $object object name
@param string $uploadId uploadId
@param array $listParts array( array("PartNumber"=> int, "ETag"=>string))
@param array $options Key-Value array
@throws OssException
@return null | completeMultipartUpload | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function listMultipartUploads($bucket, $options = null)
{
$this->precheckCommon($bucket, NULL, $options, false);
$options[self::OSS_METHOD] = self::OSS_HTTP_GET;
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_OBJECT] = '/';
$options[self::OSS_SUB_RESOURCE] = 'uploads';
foreach (array('delimiter', 'key-marker', 'max-uploads', 'prefix', 'upload-id-marker') as $param) {
if (isset($options[$param])) {
$options[self::OSS_QUERY_STRING][$param] = $options[$param];
unset($options[$param]);
}
}
$query = isset($options[self::OSS_QUERY_STRING]) ? $options[self::OSS_QUERY_STRING] : array();
$options[self::OSS_QUERY_STRING] = array_merge(
$query,
array(self::OSS_ENCODING_TYPE => self::OSS_ENCODING_TYPE_URL)
);
$response = $this->auth($options);
$result = new ListMultipartUploadResult($response);
return $result->getData();
} | Lists all ongoing multipart upload events, which means all initialized but not completed or aborted multipart uploads.
@param string $bucket bucket
@param array $options key-value array--expected keys are 'delimiter', 'key-marker', 'max-uploads', 'prefix', 'upload-id-marker'
@throws OssException
@return ListMultipartUploadInfo | listMultipartUploads | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function uploadPartCopy($fromBucket, $fromObject, $toBucket, $toObject, $partNumber, $uploadId, $options = NULL)
{
$this->precheckCommon($fromBucket, $fromObject, $options);
$this->precheckCommon($toBucket, $toObject, $options);
//If $options['isFullCopy'] is not set, copy from the beginning
$start_range = "0";
if (isset($options['start'])) {
$start_range = $options['start'];
}
$end_range = "";
if (isset($options['end'])) {
$end_range = $options['end'];
}
$options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
$options[self::OSS_BUCKET] = $toBucket;
$options[self::OSS_OBJECT] = $toObject;
$options[self::OSS_PART_NUM] = $partNumber;
$options[self::OSS_UPLOAD_ID] = $uploadId;
if (!isset($options[self::OSS_HEADERS])) {
$options[self::OSS_HEADERS] = array();
}
$param = '/' . $fromBucket . '/' . rawurlencode($fromObject);
if (isset($options[self::OSS_VERSION_ID])) {
$param = $param . '?versionId='.$options[self::OSS_VERSION_ID];
unset($options[self::OSS_VERSION_ID]);
}
$options[self::OSS_HEADERS][self::OSS_OBJECT_COPY_SOURCE] = $param;
$options[self::OSS_HEADERS][self::OSS_OBJECT_COPY_SOURCE_RANGE] = "bytes=" . $start_range . "-" . $end_range;
$response = $this->auth($options);
$result = new UploadPartResult($response);
return $result->getData();
} | Copy an existing file as a part
@param string $fromBucket source bucket name
@param string $fromObject source object name
@param string $toBucket target bucket name
@param string $toObject target object name
@param int $partNumber Part number
@param string $uploadId Upload Id
@param array $options Key-Value array---it should have 'start' or 'end' key to specify the range of the source object to copy. If it's not specifed, the whole object is copied.
@return null
@throws OssException | uploadPartCopy | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function signUrl($bucket, $object, $timeout = 60, $method = self::OSS_HTTP_GET, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
//method
if (self::OSS_HTTP_GET !== $method && self::OSS_HTTP_PUT !== $method) {
throw new OssException("method is invalid");
}
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_OBJECT] = $object;
$options[self::OSS_METHOD] = $method;
if (!isset($options[self::OSS_CONTENT_TYPE])) {
$options[self::OSS_CONTENT_TYPE] = '';
}
$timeout = time() + $timeout;
$options[self::OSS_PREAUTH] = $timeout;
$options[self::OSS_DATE] = $timeout;
$this->setSignStsInUrl(true);
return $this->auth($options);
} | Sign URL with specified expiration time in seconds (timeout) and HTTP method.
The signed URL could be used to access the object directly.
@param string $bucket
@param string $object
@param int $timeout expiration time in seconds.
@param string $method
@param array $options Key-Value array
@return string
@throws OssException | signUrl | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function generatePresignedUrl($bucket, $object, $expiration, $method = self::OSS_HTTP_GET, $options = NULL)
{
$this->precheckCommon($bucket, $object, $options);
//method
if (self::OSS_HTTP_GET !== $method && self::OSS_HTTP_PUT !== $method) {
throw new OssException("method is invalid");
}
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_OBJECT] = $object;
$options[self::OSS_METHOD] = $method;
if (!isset($options[self::OSS_CONTENT_TYPE])) {
$options[self::OSS_CONTENT_TYPE] = '';
}
$options[self::OSS_PREAUTH] = $expiration;
$options[self::OSS_DATE] = $expiration;
$this->setSignStsInUrl(true);
return $this->auth($options);
} | Sign URL with specified expiration time in seconds and HTTP method.
The signed URL could be used to access the object directly.
@param string $bucket
@param string $object
@param int $expiration expiration time of the Url, unix epoch, since 1970.1.1 00.00.00 UTC
@param string $method
@param array $options Key-Value array
@return string
@throws OssException | generatePresignedUrl | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
private function precheckOptions(&$options)
{
OssUtil::validateOptions($options);
if (!$options) {
$options = array();
}
} | validates options. Create a empty array if it's NULL.
@param array $options
@throws OssException | precheckOptions | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
private function precheckCommon($bucket, $object, &$options, $isCheckObject = true)
{
if ($isCheckObject) {
$this->precheckObject($object);
}
$this->precheckOptions($options);
$this->precheckBucket($bucket);
} | Validates bucket,options parameters and optionally validate object parameter.
@param string $bucket
@param string $object
@param array $options
@param bool $isCheckObject | precheckCommon | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
private function getValue($options, $key, $default = NULL, $isCheckEmpty = false, $isCheckBool = false)
{
$value = $default;
if (isset($options[$key])) {
if ($isCheckEmpty) {
if (!empty($options[$key])) {
$value = $options[$key];
}
} else {
$value = $options[$key];
}
unset($options[$key]);
}
if ($isCheckBool) {
if ($value !== true && $value !== false) {
$value = false;
}
}
return $value;
} | Gets value of the specified key from the options
@param array $options
@param string $key
@param string $default
@param bool $isCheckEmpty
@param bool $isCheckBool
@return bool|null | getValue | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function setSignStsInUrl($enable)
{
$this->enableStsInUrl = $enable;
} | Enaable/disable STS in the URL. This is to determine the $sts value passed from constructor take effect or not.
@param boolean $enable | setSignStsInUrl | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
private function authPrecheckBucket($options)
{
if (!(('/' == $options[self::OSS_OBJECT]) && ('' == $options[self::OSS_BUCKET]) && ('GET' == $options[self::OSS_METHOD])) && !OssUtil::validateBucket($options[self::OSS_BUCKET])) {
throw new OssException('"' . $options[self::OSS_BUCKET] . '"' . 'bucket name is invalid');
}
} | Validates bucket name--throw OssException if it's invalid
@param $options
@throws OssException | authPrecheckBucket | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
private function authPrecheckObject($options)
{
if (isset($options[self::OSS_OBJECT]) && $options[self::OSS_OBJECT] === '/') {
return;
}
if (isset($options[self::OSS_OBJECT]) && !OssUtil::validateObject($options[self::OSS_OBJECT])) {
throw new OssException('"' . $options[self::OSS_OBJECT] . '"' . ' object name is invalid');
}
} | Validates the object name--throw OssException if it's invalid.
@param $options
@throws OssException | authPrecheckObject | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
private function authPrecheckAcl($options)
{
if (isset($options[self::OSS_HEADERS][self::OSS_ACL]) && !empty($options[self::OSS_HEADERS][self::OSS_ACL])) {
if (!in_array(strtolower($options[self::OSS_HEADERS][self::OSS_ACL]), self::$OSS_ACL_TYPES)) {
throw new OssException($options[self::OSS_HEADERS][self::OSS_ACL] . ':' . 'acl is invalid(private,public-read,public-read-write)');
}
}
} | Checks if the ACL is one of the 3 predefined one. Throw OSSException if not.
@param $options
@throws OssException | authPrecheckAcl | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
private function generateHostname($bucket)
{
if ($this->hostType === self::OSS_HOST_TYPE_IP) {
$hostname = $this->hostname;
} elseif ($this->hostType === self::OSS_HOST_TYPE_CNAME) {
$hostname = $this->hostname;
} else {
// Private domain or public domain
$hostname = ($bucket == '') ? $this->hostname : ($bucket . '.') . $this->hostname;
}
return $hostname;
} | Gets the host name for the current request.
It could be either a third level domain (prefixed by bucket name) or second level domain if it's CName or IP
@param $bucket
@return string The host name without the protocol scheem (e.g. https://) | generateHostname | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
private function generateResourceUri($options)
{
$resource_uri = "";
// resource_uri + bucket
if (isset($options[self::OSS_BUCKET]) && '' !== $options[self::OSS_BUCKET]) {
if ($this->hostType === self::OSS_HOST_TYPE_IP) {
$resource_uri = '/' . $options[self::OSS_BUCKET];
}
}
// resource_uri + object
if (isset($options[self::OSS_OBJECT]) && '/' !== $options[self::OSS_OBJECT]) {
$resource_uri .= '/' . str_replace(array('%2F', '%25'), array('/', '%'), rawurlencode($options[self::OSS_OBJECT]));
}
// resource_uri + sub_resource
$conjunction = '?';
if (isset($options[self::OSS_SUB_RESOURCE])) {
$resource_uri .= $conjunction . $options[self::OSS_SUB_RESOURCE];
}
return $resource_uri;
} | Gets the resource Uri in the current request
@param $options
@return string return the resource uri. | generateResourceUri | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
private function generateSignableQueryStringParam($options,$cred)
{
$signableQueryStringParams = array();
$signableList = array(
self::OSS_PART_NUM,
'response-content-type',
'response-content-language',
'response-cache-control',
'response-content-encoding',
'response-expires',
'response-content-disposition',
self::OSS_UPLOAD_ID,
self::OSS_COMP,
self::OSS_LIVE_CHANNEL_STATUS,
self::OSS_LIVE_CHANNEL_START_TIME,
self::OSS_LIVE_CHANNEL_END_TIME,
self::OSS_PROCESS,
self::OSS_POSITION,
self::OSS_SYMLINK,
self::OSS_RESTORE,
self::OSS_TAGGING,
self::OSS_WORM_ID,
self::OSS_TRAFFIC_LIMIT,
self::OSS_VERSION_ID,
self::OSS_CONTINUATION_TOKEN,
self::OSS_CNAME,
);
foreach ($signableList as $item) {
if (isset($options[$item])) {
$signableQueryStringParams[$item] = $options[$item];
}
}
if ($this->enableStsInUrl && (!empty($cred->getSecurityToken()))) {
$signableQueryStringParams["security-token"] = $cred->getSecurityToken();
}
return $signableQueryStringParams;
} | Generates the signalbe query string parameters in array type
@param array $options
@param Credentials $cred
@return array | generateSignableQueryStringParam | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
private function generateSignableResource($options)
{
$signableResource = "";
$signableResource .= '/';
if (isset($options[self::OSS_BUCKET]) && '' !== $options[self::OSS_BUCKET]) {
$signableResource .= $options[self::OSS_BUCKET];
// if there's no object in options, adding a '/' if the host type is not IP.\
if ($options[self::OSS_OBJECT] == '/') {
if ($this->hostType !== self::OSS_HOST_TYPE_IP) {
$signableResource .= "/";
}
}
} | Generates the resource uri for signing
@param mixed $options
@return string | generateSignableResource | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public static function checkEnv()
{
if (function_exists('get_loaded_extensions')) {
//Test curl extension
$enabled_extension = array("curl");
$extensions = get_loaded_extensions();
if ($extensions) {
foreach ($enabled_extension as $item) {
if (!in_array($item, $extensions)) {
throw new OssException("Extension {" . $item . "} is not installed or not enabled, please check your php env.");
}
}
} else {
throw new OssException("function get_loaded_extensions not found.");
}
} else {
throw new OssException('Function get_loaded_extensions has been disabled, please check php config.');
}
} | Check if all dependent extensions are installed correctly.
For now only "curl" is needed.
@throws OssException | checkEnv | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function setTimeout($timeout)
{
$this->timeout = $timeout;
} | Sets the http's timeout (in seconds)
@param int $timeout | setTimeout | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function setConnectTimeout($connectTimeout)
{
$this->connectTimeout = $connectTimeout;
} | Sets the http's connection timeout (in seconds)
@param int $connectTimeout | setConnectTimeout | php | xiebruce/PicUploader | vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php | MIT |
public function getBuildNumber()
{
if (array_key_exists("buildNumber", $this->_propDict)) {
return $this->_propDict["buildNumber"];
} else {
return null;
}
} | Gets the buildNumber
The build number of the app.
@return string|null The buildNumber | getBuildNumber | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | MIT |
public function setBuildNumber($val)
{
$this->_propDict["buildNumber"] = $val;
return $this;
} | Sets the buildNumber
The build number of the app.
@param string $val The value of the buildNumber
@return MacOSLobChildApp | setBuildNumber | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | MIT |
public function getBundleId()
{
if (array_key_exists("bundleId", $this->_propDict)) {
return $this->_propDict["bundleId"];
} else {
return null;
}
} | Gets the bundleId
The bundleId of the app.
@return string|null The bundleId | getBundleId | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | MIT |
public function setBundleId($val)
{
$this->_propDict["bundleId"] = $val;
return $this;
} | Sets the bundleId
The bundleId of the app.
@param string $val The value of the bundleId
@return MacOSLobChildApp | setBundleId | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | MIT |
public function getVersionNumber()
{
if (array_key_exists("versionNumber", $this->_propDict)) {
return $this->_propDict["versionNumber"];
} else {
return null;
}
} | Gets the versionNumber
The version number of the app.
@return string|null The versionNumber | getVersionNumber | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | MIT |
public function setVersionNumber($val)
{
$this->_propDict["versionNumber"] = $val;
return $this;
} | Sets the versionNumber
The version number of the app.
@param string $val The value of the versionNumber
@return MacOSLobChildApp | setVersionNumber | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Model/MacOSLobChildApp.php | MIT |
public function getConnectAutomatically()
{
if (array_key_exists("connectAutomatically", $this->_propDict)) {
return $this->_propDict["connectAutomatically"];
} else {
return null;
}
} | Gets the connectAutomatically
Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network.
@return bool|null The connectAutomatically | getConnectAutomatically | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function setConnectAutomatically($val)
{
$this->_propDict["connectAutomatically"] = boolval($val);
return $this;
} | Sets the connectAutomatically
Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network.
@param bool $val The connectAutomatically
@return AndroidDeviceOwnerWiFiConfiguration | setConnectAutomatically | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function getConnectWhenNetworkNameIsHidden()
{
if (array_key_exists("connectWhenNetworkNameIsHidden", $this->_propDict)) {
return $this->_propDict["connectWhenNetworkNameIsHidden"];
} else {
return null;
}
} | Gets the connectWhenNetworkNameIsHidden
When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices.
@return bool|null The connectWhenNetworkNameIsHidden | getConnectWhenNetworkNameIsHidden | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function setConnectWhenNetworkNameIsHidden($val)
{
$this->_propDict["connectWhenNetworkNameIsHidden"] = boolval($val);
return $this;
} | Sets the connectWhenNetworkNameIsHidden
When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices.
@param bool $val The connectWhenNetworkNameIsHidden
@return AndroidDeviceOwnerWiFiConfiguration | setConnectWhenNetworkNameIsHidden | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function getNetworkName()
{
if (array_key_exists("networkName", $this->_propDict)) {
return $this->_propDict["networkName"];
} else {
return null;
}
} | Gets the networkName
Network Name
@return string|null The networkName | getNetworkName | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function setNetworkName($val)
{
$this->_propDict["networkName"] = $val;
return $this;
} | Sets the networkName
Network Name
@param string $val The networkName
@return AndroidDeviceOwnerWiFiConfiguration | setNetworkName | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function getPreSharedKey()
{
if (array_key_exists("preSharedKey", $this->_propDict)) {
return $this->_propDict["preSharedKey"];
} else {
return null;
}
} | Gets the preSharedKey
This is the pre-shared key for WPA Personal Wi-Fi network.
@return string|null The preSharedKey | getPreSharedKey | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function setPreSharedKey($val)
{
$this->_propDict["preSharedKey"] = $val;
return $this;
} | Sets the preSharedKey
This is the pre-shared key for WPA Personal Wi-Fi network.
@param string $val The preSharedKey
@return AndroidDeviceOwnerWiFiConfiguration | setPreSharedKey | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function getPreSharedKeyIsSet()
{
if (array_key_exists("preSharedKeyIsSet", $this->_propDict)) {
return $this->_propDict["preSharedKeyIsSet"];
} else {
return null;
}
} | Gets the preSharedKeyIsSet
This is the pre-shared key for WPA Personal Wi-Fi network.
@return bool|null The preSharedKeyIsSet | getPreSharedKeyIsSet | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function setPreSharedKeyIsSet($val)
{
$this->_propDict["preSharedKeyIsSet"] = boolval($val);
return $this;
} | Sets the preSharedKeyIsSet
This is the pre-shared key for WPA Personal Wi-Fi network.
@param bool $val The preSharedKeyIsSet
@return AndroidDeviceOwnerWiFiConfiguration | setPreSharedKeyIsSet | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function getProxyAutomaticConfigurationUrl()
{
if (array_key_exists("proxyAutomaticConfigurationUrl", $this->_propDict)) {
return $this->_propDict["proxyAutomaticConfigurationUrl"];
} else {
return null;
}
} | Gets the proxyAutomaticConfigurationUrl
Specify the proxy server configuration script URL.
@return string|null The proxyAutomaticConfigurationUrl | getProxyAutomaticConfigurationUrl | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function setProxyAutomaticConfigurationUrl($val)
{
$this->_propDict["proxyAutomaticConfigurationUrl"] = $val;
return $this;
} | Sets the proxyAutomaticConfigurationUrl
Specify the proxy server configuration script URL.
@param string $val The proxyAutomaticConfigurationUrl
@return AndroidDeviceOwnerWiFiConfiguration | setProxyAutomaticConfigurationUrl | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function getProxyExclusionList()
{
if (array_key_exists("proxyExclusionList", $this->_propDict)) {
return $this->_propDict["proxyExclusionList"];
} else {
return null;
}
} | Gets the proxyExclusionList
List of hosts to exclude using the proxy on connections for. These hosts can use wildcards such as .example.com.
@return string|null The proxyExclusionList | getProxyExclusionList | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function setProxyExclusionList($val)
{
$this->_propDict["proxyExclusionList"] = $val;
return $this;
} | Sets the proxyExclusionList
List of hosts to exclude using the proxy on connections for. These hosts can use wildcards such as .example.com.
@param string $val The proxyExclusionList
@return AndroidDeviceOwnerWiFiConfiguration | setProxyExclusionList | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function getProxyManualAddress()
{
if (array_key_exists("proxyManualAddress", $this->_propDict)) {
return $this->_propDict["proxyManualAddress"];
} else {
return null;
}
} | Gets the proxyManualAddress
Specify the proxy server IP address. Android documentation does not specify IPv4 or IPv6. For example: 192.168.1.1.
@return string|null The proxyManualAddress | getProxyManualAddress | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function setProxyManualAddress($val)
{
$this->_propDict["proxyManualAddress"] = $val;
return $this;
} | Sets the proxyManualAddress
Specify the proxy server IP address. Android documentation does not specify IPv4 or IPv6. For example: 192.168.1.1.
@param string $val The proxyManualAddress
@return AndroidDeviceOwnerWiFiConfiguration | setProxyManualAddress | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function getProxyManualPort()
{
if (array_key_exists("proxyManualPort", $this->_propDict)) {
return $this->_propDict["proxyManualPort"];
} else {
return null;
}
} | Gets the proxyManualPort
Specify the proxy server port.
@return int|null The proxyManualPort | getProxyManualPort | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
public function setProxyManualPort($val)
{
$this->_propDict["proxyManualPort"] = intval($val);
return $this;
} | Sets the proxyManualPort
Specify the proxy server port.
@param int $val The proxyManualPort
@return AndroidDeviceOwnerWiFiConfiguration | setProxyManualPort | php | xiebruce/PicUploader | vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | https://github.com/xiebruce/PicUploader/blob/master/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/AndroidDeviceOwnerWiFiConfiguration.php | MIT |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.