本文整理汇总了PHP中WindowsAzure\Common\Internal\Validate::isDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Validate::isDate方法的具体用法?PHP Validate::isDate怎么用?PHP Validate::isDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WindowsAzure\Common\Internal\Validate
的用法示例。
在下文中一共展示了Validate::isDate方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @param string $incarnation The incarnation.
* @param string $expectedState The expected state.
* @param string $environmentPath The environment path.
* @param \DateTime $deadline The deadline.
* @param string $currentStateEndpoint The current state endpoint.
*/
public function __construct($incarnation, $expectedState, $environmentPath, $deadline, $currentStateEndpoint)
{
Validate::isDate($deadline);
$this->_incarnation = $incarnation;
$this->_expectedState = $expectedState;
$this->_environmentPath = $environmentPath;
$this->_deadline = $deadline;
$this->_currentStateEndpoint = $currentStateEndpoint;
}
示例2: setLastModified
/**
* Sets blob lastModified.
*
* @param \DateTime $lastModified value.
*
* @return none.
*/
public function setLastModified($lastModified)
{
Validate::isDate($lastModified);
$this->_lastModified = $lastModified;
}
示例3: testIsDateWithNonDate
/**
* @covers WindowsAzure\Common\Internal\Validate::isDate
*/
public function testIsDateWithNonDate()
{
$this->setExpectedException(get_class(new InvalidArgumentTypeException('DateTime')));
Validate::isDate('not date');
}
示例4: ifNotModifiedSince
/**
* Returns an access condition such that an operation will be performed only if
* the resource has not been modified since the specified time.
* <p>
* Setting this access condition modifies the request to include the HTTP
* <i>If-Unmodified-Since</i> conditional header. If this access condition is
* set, the operation is performed only if the resource has not been modified
* since the specified time.
* <p>
* For more information, see
* <a href= 'http://go.microsoft.com/fwlink/?LinkID=224642&clcid=0x409'>
* Specifying Conditional Headers for Blob Service Operations</a>.
*
* @param \DateTime $lastModified date that represents the last-modified
* time to check for the resource.
*
* @return \WindowsAzure\Blob\Models\AccessCondition
*/
public static function ifNotModifiedSince($lastModified)
{
Validate::isDate($lastModified);
return new AccessCondition(Resources::IF_UNMODIFIED_SINCE, $lastModified);
}
示例5: setExpiry
/**
* Sets expiry.
*
* @param \DateTime $expiry value.
*
* @return none.
*/
public function setExpiry($expiry)
{
Validate::isDate($expiry);
$this->_expiry = $expiry;
}
示例6: setValueArrayDateTime
/**
* Sets a DateTime value in an array.
*
* @param array &$valueArray The array of a set of values.
* @param string $key The key of the key value pair.
* @param \DateTime $value The value of the key value pair.
*
* @return none
*/
public function setValueArrayDateTime(&$valueArray, $key, $value)
{
Validate::isArray($valueArray, 'valueArray');
Validate::isString($key, 'key');
if (!empty($value)) {
Validate::isDate($value, 'value');
$valueArray[$key] = gmdate(Resources::AZURE_DATE_FORMAT, $value->getTimestamp());
}
}
示例7: addSignedIdentifier
/**
* Adds new signed modifier
*
* @param string $id a unique id for this modifier
* @param \DateTime $start The time at which the Shared Access Signature
* becomes valid. If omitted, start time for this call is assumed to be
* the time when the Blob service receives the request.
* @param \DateTime $expiry The time at which the Shared Access Signature
* becomes invalid. This field may be omitted if it has been specified as
* part of a container-level access policy.
* @param string $permission The permissions associated with the Shared
* Access Signature. The user is restricted to operations allowed by the
* permissions. Valid permissions values are read (r), write (w), delete (d) and
* list (l).
*
* @return none.
*
* @see http://msdn.microsoft.com/en-us/library/windowsazure/hh508996.aspx
*/
public function addSignedIdentifier($id, $start, $expiry, $permission)
{
Validate::isString($id, 'id');
Validate::isDate($start);
Validate::isDate($expiry);
Validate::isString($permission, 'permission');
$accessPolicy = new AccessPolicy();
$accessPolicy->setStart($start);
$accessPolicy->setExpiry($expiry);
$accessPolicy->setPermission($permission);
$signedIdentifier = new SignedIdentifier();
$signedIdentifier->setId($id);
$signedIdentifier->setAccessPolicy($accessPolicy);
$this->_signedIdentifiers[] = $signedIdentifier;
}
示例8: setTimeNextVisible
/**
* Sets timeNextVisible field.
*
* @param \DateTime $timeNextVisible A UTC date/time value that represents when
* the message will be visible on the queue.
*
* @return none.
*/
public function setTimeNextVisible($timeNextVisible)
{
Validate::isDate($timeNextVisible);
$this->_timeNextVisible = $timeNextVisible;
}