public function addSignedIdentifier(
        $id,
        \DateTime $start,
        \DateTime $expiry,
        $permissions
    ) {
        Validate::canCastAsString($id, 'id');
        if ($start != null) {
            Validate::isDate($start);
        }
        Validate::isDate($expiry);
        Validate::canCastAsString($permissions, 'permissions');

        $accessPolicy = static::createAccessPolicy();
        $accessPolicy->setStart($start);
        $accessPolicy->setExpiry($expiry);
        $accessPolicy->setPermission($permissions);

        $signedIdentifier = new SignedIdentifier();
        $signedIdentifier->setId($id);
        $signedIdentifier->setAccessPolicy($accessPolicy);

        // Remove the signed identifier with the same ID.
        $this->removeSignedIdentifier($id);

        // There can be no more than 5 signed identifiers at the same time.
        Validate::isTrue(
            count($this->getSignedIdentifiers()) < 5,
            Resources::ERROR_TOO_MANY_SIGNED_IDENTIFIERS
        );

        $this->signedIdentifiers[] = $signedIdentifier;
    }
public function addSignedIdentifier(
        $id,
        \DateTime $start,
        \DateTime $expiry,
        $permissions
    ) {
        Validate::canCastAsString($id, 'id');
        if ($start != null) {
            Validate::isDate($start);
        }
        Validate::isDate($expiry);
        Validate::canCastAsString($permissions, 'permissions');

        $accessPolicy = static::createAccessPolicy();
        $accessPolicy->setStart($start);
        $accessPolicy->setExpiry($expiry);
        $accessPolicy->setPermission($permissions);

        $signedIdentifier = new SignedIdentifier();
        $signedIdentifier->setId($id);
        $signedIdentifier->setAccessPolicy($accessPolicy);

        // Remove the signed identifier with the same ID.
        $this->removeSignedIdentifier($id);

        // There can be no more than 5 signed identifiers at the same time.
        Validate::isTrue(
            count($this->getSignedIdentifiers()) < 5,
            Resources::ERROR_TOO_MANY_SIGNED_IDENTIFIERS
        );

        $this->signedIdentifiers[] = $signedIdentifier;
    }
public function addSignedIdentifier ( $ id , \ DateTime $ start , \ DateTime $ expiry , $ permissions ) { Validate :: canCastAsString ( $ id , 'id' ) ; if ( $ start != null ) { Validate :: isDate ( $ start ) ; } Validate :: isDate ( $ expiry ) ; Validate :: canCastAsString ( $ permissions , 'permissions' ) ; $ accessPolicy = static :: createAccessPolicy ( ) ; $ accessPolicy -> setStart ( $ start ) ; $ accessPolicy -> setExpiry ( $ expiry ) ; $ accessPolicy -> setPermission ( $ permissions ) ; $ signedIdentifier = new SignedIdentifier ( ) ; $ signedIdentifier -> setId ( $ id ) ; $ signedIdentifier -> setAccessPolicy ( $ accessPolicy ) ; // Remove the signed identifier with the same ID. $ this -> removeSignedIdentifier ( $ id ) ; // There can be no more than 5 signed identifiers at the same time. Validate :: isTrue ( count ( $ this -> getSignedIdentifiers ( ) ) < 5 , Resources :: ERROR_TOO_MANY_SIGNED_IDENTIFIERS ) ; $ this -> signedIdentifiers [ ] = $ signedIdentifier ; }
Add a signed identifier to the ACL.

@param string    $id          A unique id for this signed identifier.
@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 service receives the
request.
@param \DateTime $expiry      The time at which the Shared Access
Signature becomes invalid.
@param string    $permissions The permissions associated with the Shared
Access Signature. The user is restricted to
operations allowed by the permissions.

@return void

@see https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/establishing-a-stored-access-policy
Add a signed identifier to the ACL .