0 follower

Trait Yiisoft\Db\Profiler\ProfilerAwareTrait

Implemented byYiisoft\Db\Driver\Pdo\AbstractPdoCommand, Yiisoft\Db\Driver\Pdo\AbstractPdoConnection

Provides access to the database profiler, a tool for collecting and analyzing database queries.

This can be useful for debugging and optimizing database performance.

Protected Properties

Hide inherited properties

Property Type Description Defined By
$profiler ?\Yiisoft\Db\Profiler\ProfilerInterface Yiisoft\Db\Profiler\ProfilerAwareTrait

Public Methods

Hide inherited methods

Method Description Defined By
setProfiler() Yiisoft\Db\Profiler\ProfilerAwareTrait

Property Details

Hide inherited properties

$profiler protected property
protected ?\Yiisoft\Db\Profiler\ProfilerInterface $profiler null

Method Details

Hide inherited methods

setProfiler() public method

public void setProfiler ( ?\Yiisoft\Db\Profiler\ProfilerInterface $profiler )
$profiler ?\Yiisoft\Db\Profiler\ProfilerInterface

                public function setProfiler(?ProfilerInterface $profiler): void
{
    $this->profiler = $profiler;
}