コード例 #1
0
ファイル: WsSecurity.php プロジェクト: wsdltophp/wssecurity
 /**
  * @param int $addCreated
  * @param int $addExpires
  * @return WsSecurity
  */
 protected function setTimestamp($addCreated = 0, $addExpires = 0)
 {
     $timestampValue = $this->getPassword()->getTimestampValue();
     if ($addCreated && $addExpires && $timestampValue) {
         $timestamp = new Timestamp();
         $timestamp->setCreated(new Created($timestampValue));
         $timestamp->setExpires(new Expires($timestampValue, $addExpires));
         $this->security->setTimestamp($timestamp);
     }
     return $this;
 }