/**
  * Adds a header with the given name and value. The date is either a long value which represents an UNIX-Timestamp or a
  * blaze\util\Date.
  *
  * @param 	blaze\lang\String|string $name The name of the header which shall be sent
  * @param 	blaze\util\Date|long $value The name of the header which shall be sent
  * @see 	blaze\netlet\http\HttpNetletResponse:setDateHeader
  */
 public function addDateHeader($name, $value)
 {
     if (!$value instanceof \blaze\util\Date) {
         $value = \blaze\util\Date::fromUnixTime(\blaze\lang\Long::asNative($value));
     }
     $df = new \blaze\text\DateFormat('D, d M Y H:i:s');
     $this->addHeader($name, $df->format($value));
 }
Пример #2
0
 public function longValue()
 {
     return Long::asNative($this->value);
 }
 public function setLong($identifier, $value)
 {
     $this->set($identifier, \blaze\lang\Long::asNative($value), \PDO::PARAM_STR);
     return $this;
 }
Пример #4
0
 /**
  * @param long $timestamp
  * @return blaze\util\Date
  */
 public function setUnixTime($timestamp)
 {
     return $this->setTime(\blaze\lang\Long::asNative($timestamp) * 1000);
 }
Пример #5
0
 public function longValue()
 {
     \blaze\lang\Long::asNative($this->getIntVal());
 }
Пример #6
0
 public function getLong($identifier)
 {
     $this->checkClosed();
     $val = $this->get($identifier);
     if ($val == null) {
         return null;
     }
     return Long::asNative($val);
 }
Пример #7
0
 public function writeLong(\long $long)
 {
     $long = \blaze\lang\Long::asNative($long);
     return $this->out->write(serialize($long));
 }