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 getCurrentError( ): Throwable|null

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

            
hasCurrentError() public method

Whether a proxy has current error.

public hasCurrentError( ): boolean
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 repeatError( Throwable $error ): void
$error Throwable

A throwable object.

throws Throwable

An exact error previously stored in $currentError.

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

            
resetCurrentError() protected method

Resets current error.

protected resetCurrentError( ): void

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