ApaiIO\Request\Util::getTimeStamp PHP Method

getTimeStamp() public static method

Provides the current timestamp according to the requirements of amazon
public static getTimeStamp ( ) : string
return string
    public static function getTimeStamp()
    {
        return gmdate("Y-m-d\\TH:i:s\\Z");
    }

Usage Example

Example #1
0
 /**
  * Provides some necessary soap headers
  *
  * @param OperationInterface $operation
  *
  * @return array Each element is a concrete SoapHeader object
  */
 protected function buildSoapHeader(OperationInterface $operation)
 {
     $timeStamp = Util::getTimeStamp();
     $signature = $this->buildSignature($operation->getName() . $timeStamp);
     return array(new \SoapHeader('http://security.amazonaws.com/doc/2007-01-01/', 'AWSAccessKeyId', $this->configuration->getAccessKey()), new \SoapHeader('http://security.amazonaws.com/doc/2007-01-01/', 'Timestamp', $timeStamp), new \SoapHeader('http://security.amazonaws.com/doc/2007-01-01/', 'Signature', $signature));
 }
All Usage Examples Of ApaiIO\Request\Util::getTimeStamp