public function setProfiler(Profiler\ProfilerInterface $profiler) { $this->profiler = $profiler; if ($this->connection instanceof Profiler\ProfilerAwareInterface) { $this->connection->setProfiler($profiler); } if ($this->statementPrototype instanceof Profiler\ProfilerAwareInterface) { $this->statementPrototype->setProfiler($profiler); } return $this; }