Final Class Yiisoft\Db\Profiler\Context\CommandContext
| Inheritance | Yiisoft\Db\Profiler\Context\CommandContext » Yiisoft\Db\Profiler\Context\AbstractContext |
|---|---|
| Implements | Yiisoft\Db\Profiler\ContextInterface |
Public Methods
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| EXCEPTION | 'exception' | Yiisoft\Db\Profiler\Context\AbstractContext | |
| LOG_CONTEXT | 'logContext' | Yiisoft\Db\Profiler\Context\CommandContext | |
| METHOD | 'method' | Yiisoft\Db\Profiler\Context\AbstractContext | |
| PARAMS | 'params' | Yiisoft\Db\Profiler\Context\CommandContext | |
| SQL | 'sql' | Yiisoft\Db\Profiler\Context\CommandContext |
Method Details
| public mixed __construct ( string $method, string $logContext, string $sql, array $params ) | ||
| $method | string | |
| $logContext | string | |
| $sql | string | |
| $params | array | |
public function __construct(
private string $method,
private string $logContext,
private string $sql,
private array $params,
) {
parent::__construct($this->method);
}
| public array asArray ( ) |
public function asArray(): array
{
return parent::asArray() + [
self::LOG_CONTEXT => $this->logContext,
self::SQL => $this->sql,
self::PARAMS => $this->params,
];
}
| public Yiisoft\Db\Profiler\Context\CommandContext setException ( Throwable $e ) | ||
| $e | Throwable | |
public function setException(Throwable $e): static
{
$this->exception = $e;
return $this;
}
Signup or Login in order to comment.