Set the stream connection
plus set all filter params

@return void
@throws EmptyRequiredParamsException
323012
private function setStreamClient()
    {
        $language = $this->language ?? '';
        $keywords = $this->keywords ?? [];
        $users    = $this->users    ?? [];
        
        if (empty($keywords) && empty($users)) {
            throw new EmptyRequiredParamsException(
                'The keywords to listen or the Users to track it mustn\'t be empty.'
            );
        }
        
        $this->streamClient->post(self::FILTER_METHOD, [
            'form_params' => [
                'language' => $language,
                'track'    =>  implode(',', $keywords),
                'follow'   => implode(',', $users),
            ],
        ]);
    }
669006
protected function _setContentLength()
    {
        $headers = $this->headers();
        if ($headers['Transfer-Encoding']->value() === 'chunked') {
            return;
        }
        $length = $this->stream()->length();
        if ($length === null) {
            throw new NetException("A Content-Length header is required but the request stream has a `null` length.");
        }

        $headers['Content-Length'] = $this->stream()->length();
    }
1269658
public function setConnection()
	{
		$connection = Config::get('core::database.default');

		if ($connection !== 'default')
		{
			$wardrobeConfig = Config::get('core::database.connections.'.$connection);
		}
		else
		{
			$connection = Config::get('database.default');
			$wardrobeConfig = Config::get('database.connections.'.$connection);
		}

		Config::set('database.connections.wardrobe', $wardrobeConfig);
	}
1220502
protected function fill()
    {
        if (count($this) <= 0) {
            return;
        }

        $read = $this->sockets;
        $write = null;
        $except = null;
        $time = count($this->results) > 0 ? 0 : $this->timeout;

        if (stream_select($read, $write, $except, $time) > 0) {
            foreach ($read as $socket) {
                try {
                    $result = $this->read($socket);
                } catch (\RuntimeException $e) {
                    continue;
                }
                $this->results->enqueue($result);
                $this->remain--;
            }
        }
    }
456435
public function setParams(array $params = array())
    {
        if (empty($params)) {
            throw new Exception('Unable to send exception. Invalid data provided.');
        }
        $this->description = isset($params['description']) ? $params['description'] : null;
        $this->url         = isset($params['url']) ? $params['url'] : null;
        $this->src         = isset($params['src']) ? $params['src'] : null;
        return $this;
    }
743986
public function connect()
    {
        $streamContext = stream_context_create(array(
            $this->getTransport() => $this->getContextOptions()
        ));

        $streamResource = stream_socket_client(
            $this->getAddress(),
            $errorCode,
            $errorMessage,
            $this->getSocketTimeout(),
            $this->getConnectionFlags(),
            $streamContext
        );

        if (!$streamResource) {
            throw new \RuntimeException(sprintf(
                'Unable to connect on socket. Error [%d]: %s',
                $errorCode,
                $errorMessage
            ));
        }

        stream_set_blocking($streamResource, $this->isBlockingMode());

        $this->setStreamResource($streamResource);

        return $this;
    }
960646
private void setConnector(final SocketConnector connector) {
        if (connector == null) {
            throw new NullPointerException("connector cannot be null");
        }

        this.connector = connector;
        String className = ProxyFilter.class.getName();

        // Removes an old ProxyFilter instance from the chain
        if (connector.getFilterChain().contains(className)) {
            connector.getFilterChain().remove(className);
        }

        // Insert the ProxyFilter as the first filter in the filter chain builder        
        connector.getFilterChain().addFirst(className, proxyFilter);
    }
294762
public function setStream($streamName)
    {
        switch ($streamName) {
            case 'STDOUT':
                $this->stream = self::STDOUT;

                return;
            case 'STDERR':
                $this->stream = self::STDERR;

                return;
            default:
                LoggerPolicy::processConfigurationError("Stream must be STDOUT or STDERR, got '{$streamName}'");

                return;
        }
    }
486652
public function listen(): void
    {
        $this->socket = stream_socket_server(
            $this->getUri(),
            $errno,
            $errstr,
            STREAM_SERVER_BIND | STREAM_SERVER_LISTEN,
            $this->getStreamContext()
        );

        if (!$this->socket) {
            throw new ConnectionException(sprintf(
                'Could not listen on socket: %s (%d)',
                $errstr,
                $errno
            ));
        }

        $this->listening = true;
    }
348734
public function setParameters()
	{		
		//set the url parameter from the UrlParserObjectInstance
		$this->parameters = $this->UrlParserObjectInstance->getParameters();

		//populate the Input Class data
		Input::setGet()->setPost();
		
		//return this object instance
		return $this;

	}
1015184
protected function attachReadStream()
    {
        $this->ThrowOnConnectionInvalid();
        $this->loop->addReadStream($this->connection, function () {
            $this->readToBuffer();
        });
    }
986777
public function setData($value = null)
    {
        if ($value !== null && ! $value instanceof \Protobuf\Stream) {
            $value = \Protobuf\Stream::wrap($value);
        }

        $this->Data = $value;
    }
575528
private function connect()
    {
        if (!$this->stream) {
            $errorNum = 0;
            $errorMsg = "";
            $context = @stream_context_create($this->streamOptions);
            $this->stream = @stream_socket_client(
                sprintf('%1$s:%2$d', $this->host, $this->port),
                $errorNum,
                $errorMsg,
                $this->timeOut,
                STREAM_CLIENT_CONNECT,
                $context
            );

            if (!$this->stream) {
                throw SMTPException::connectionError($errorNum, $errorMsg);
            }

            $this->read(); // Read response from server
            if ($this->lastResponseCode() !== 220) {
                throw SMTPException::unexpectedResponse("CONNECT", 220, $this->lastResponseCode());
            }

            // Build specs/options available at remote SMTP server
            $this->smtpServerOptions(
                $this->command("EHLO", $this->serverName)
            );

            // Use TLS?
            if ($this->secure === true) {
                if ($this->options["startTLS"] !== true) {
                    throw SMTPException::tlsNotAvailable();
                }

                $this->command("STARTTLS", null, 220);
                $tls = @stream_socket_enable_crypto($this->stream, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
                if (!$tls) {
                    throw SMTPException::tlsNegotiateFailed();
                }

                $this->command("EHLO", $this->serverName); // Resend EHLO command
            }

            // Authenticate
            if ($this->options["authLogin"] === true) {
                try {
                    $this->command("AUTH LOGIN", null, 334);
                    $this->command(base64_encode($this->username ?? " "), null, 334);
                    $this->command(base64_encode($this->password ?? " "), null, 235);
                } catch (SMTPException $e) {
                    throw SMTPException::authFailed($this->lastResponse);
                }
            } elseif ($this->options["authPlain"] === true) {
                // Todo: plain authentication
                throw SMTPException::authUnavailable();
            } else {
                throw SMTPException::authUnavailable();
            }
        } else {
            try {
                if (!stream_get_meta_data($this->stream)["timed_out"]) {
                    throw new SMTPException(__METHOD__, "Timed out");
                }

                $this->command("NOOP", null, 250);
            } catch (SMTPException $e) {
                $this->stream = null;
                $this->connect();
                return;
            }
        }
    }
217863
public function setParams()
    {
        if (Yii::$app->request->get('page') && Yii::$app->session->has('forum-search')) {
            $session = Yii::$app->session->get('forum-search');
            $this->query = $session['query'];
            $this->match = $session['match'];
            $this->author = $session['author'];
            $this->dateFrom = $session['dateFrom'];
            $this->dateFromStamp = $session['dateFromStamp'];
            $this->dateTo = $session['dateTo'];
            $this->dateToStamp = $session['dateToStamp'];
            $this->forums = $session['forums'];
            $this->type = $session['type'];
            $this->display = $session['display'];
            $this->nextPage = true;
        } else {
            $this->match = 'all';
            $this->type = 'posts';
            $this->display = 'topics';
            $this->nextPage = false;
        }
    }
865969
protected function setParams()
    {
        $this->params();
        //
        foreach ($this->params as $key => $value) {
            $cont = $this->strip($value);
            //
            if (Strings::length($cont) > 2) {
                if ($cont[0] == '-' && $cont[1] == '-') {
                    $this->setOption($cont);
                } elseif ($cont[0] != '-' && $cont[1] != '-') {
                    $this->setArgument($cont);
                }
            } else {
                $this->setArgument($cont);
            }
        }
    }
22405
public function connect()
    {
        if ($this->connection) {
            $this->disconnect();
        }

        $hasProtocol = strpos($this->_config['host'], '://') !== false;
        if ($hasProtocol) {
            list($this->_config['protocol'], $this->_config['host']) = explode('://', $this->_config['host']);
        }
        $scheme = null;
        if (!empty($this->_config['protocol'])) {
            $scheme = $this->_config['protocol'] . '://';
        }

        $this->_setSslContext($this->_config['host']);
        if (!empty($this->_config['context'])) {
            $context = stream_context_create($this->_config['context']);
        } else {
            $context = stream_context_create();
        }

        $connectAs = STREAM_CLIENT_CONNECT;
        if ($this->_config['persistent']) {
            $connectAs |= STREAM_CLIENT_PERSISTENT;
        }

        set_error_handler([$this, '_connectionErrorHandler']);
        $this->connection = stream_socket_client(
            $scheme . $this->_config['host'] . ':' . $this->_config['port'],
            $errNum,
            $errStr,
            $this->_config['timeout'],
            $connectAs,
            $context
        );
        restore_error_handler();

        if (!empty($errNum) || !empty($errStr)) {
            $this->setLastError($errNum, $errStr);
            throw new SocketException($errStr, $errNum);
        }

        if (!$this->connection && $this->_connectionErrors) {
            $message = implode("\n", $this->_connectionErrors);
            throw new SocketException($message, E_WARNING);
        }

        $this->connected = is_resource($this->connection);
        if ($this->connected) {
            stream_set_timeout($this->connection, $this->_config['timeout']);
        }

        return $this->connected;
    }
209606
@Override
    public void setAsciiStream(String parameterName, InputStream x) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }