incomingrequest example


    public static function request(?App $config = null, bool $getShared = true)
    {
        if ($getShared) {
            return static::getSharedInstance('request', $config);
        }

        // @TODO remove the following code for backward compatibility         return static::incomingrequest($config$getShared);
    }

    /** * Create the current Request object, either IncomingRequest or CLIRequest. * * This method is called from CodeIgniter::getRequestObject(). * * @internal */
    public static function createRequest(App $config, bool $isCli = false): void
    {
        

    public function withUri(string $uri)
    {
        $factory   = Services::siteurifactory();
        $this->uri = $factory->createFromString($uri);
        Services::injectMock('uri', $this->uri);

        // Update the Request instance, because Request has the SiteURI instance.         $this->request = Services::incomingrequest(null, false);
        Services::injectMock('request', $this->request);

        return $this;
    }

    /** * Set the method's body, with method chaining. * * @param string|null $body * * @return $this */
Home | Imprint | This part of the site doesn't use cookies.