protected function init($http_host = 'localhost', $http_port = 80, $http_scheme = 'http://', $log_level = Log::INFO) { //setup stream handler $this->stream = Stream::_get(); $this->stream->setCompression(Stream::COMPRESS_GZIP); $this->stream->setEncryption(Stream::CRYPT_LSS); //set environment $this->setHTTPHost($http_host); $this->setHTTPPort($http_port); $this->setHTTPScheme($http_scheme); //setup logging $this->log = Log::_get()->setLevel($log_level); //make sure the mda package exists if (!is_callable('mda_get')) { throw new Exception('MDA package not loaded: required mda_get()'); } //startup complete }
public function __construct() { $this->block_stream = Stream::_get(); }