Hprose\Swoole\Http\Service::__construct PHP Method

__construct() public method

public __construct ( )
    public function __construct()
    {
        parent::__construct();
        $this->lastModified = gmstrftime("%a, %d %b %Y %T %Z", time());
        $this->etag = '"' . dechex(mt_rand()) . ':' . dechex(mt_rand()) . '"';
        $this->timer = new Timer();
    }

Usage Example

Example #1
0
 public function __construct($uri, $mode = SWOOLE_BASE)
 {
     parent::__construct();
     $url = $this->parseUrl($uri);
     $this->server = new swoole_http_server($url->host, $url->port, $mode, $url->type);
 }
All Usage Examples Of Hprose\Swoole\Http\Service::__construct