0 follower

Trait Yiisoft\Proxy\ProxyTrait

Implemented byYiisoft\Proxy\ObjectProxy

Public Methods

Hide inherited methods

Method Description Defined By
getCurrentError() Gets current error. Yiisoft\Proxy\ProxyTrait
hasCurrentError() Whether a proxy has current error. Yiisoft\Proxy\ProxyTrait

Protected Methods

Hide inherited methods

Method Description Defined By
repeatError() Throws current error again. Yiisoft\Proxy\ProxyTrait
resetCurrentError() Resets current error. Yiisoft\Proxy\ProxyTrait

Method Details

Hide inherited methods

getCurrentError() public method

Gets current error.

public Throwable|null getCurrentError ( )

                public function getCurrentError(): ?Throwable
{
    return $this->currentError;
}

            
hasCurrentError() public method

Whether a proxy has current error.

public boolean hasCurrentError ( )
return boolean

true if it has current error and false otherwise.

                public function hasCurrentError(): bool
{
    return $this->currentError !== null;
}

            
repeatError() protected method

Throws current error again.

protected void repeatError ( Throwable $error )
$error Throwable

A throwable object.

throws Throwable

An exact error previously stored in {@see $currentError}.

                protected function repeatError(Throwable $error): void
{
    $this->currentError = $error;
    throw $error;
}

            
resetCurrentError() protected method

Resets current error.

protected void resetCurrentError ( )

                protected function resetCurrentError(): void
{
    $this->currentError = null;
}