0 follower

Abstract Class Yiisoft\Db\Profiler\Context\AbstractContext

InheritanceYiisoft\Db\Profiler\Context\AbstractContext
ImplementsYiisoft\Db\Profiler\ContextInterface
SubclassesYiisoft\Db\Profiler\Context\CommandContext, Yiisoft\Db\Profiler\Context\ConnectionContext

Constants

Hide inherited constants

Constant Value Description Defined By
EXCEPTION 'exception' Yiisoft\Db\Profiler\Context\AbstractContext
METHOD 'method' Yiisoft\Db\Profiler\Context\AbstractContext

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( string $method )
$method string

                public function __construct(private string $method) {}

            
asArray() public method

public array asArray ( )

                public function asArray(): array
{
    return [
        self::METHOD => $this->method,
        self::EXCEPTION => $this->exception,
    ];
}

            
getType() public abstract method
public abstract string getType ( )
return string

Type of the context.

                public function getType(): string;

            
setException() public method

public Yiisoft\Db\Profiler\Context\AbstractContext setException ( Throwable $e )
$e Throwable

                public function setException(Throwable $e): static
{
    $this->exception = $e;
    return $this;
}