Example #1
0
 /**
  * Starts the profile of a SQL sentence
  *
  * @param string $sqlStatement
  * @return \Phalcon\Db\Profiler
  */
 public function startProfile($sqlStatement)
 {
     $activeProfile = new Item();
     $activeProfile->setSqlStatement($sqlStatement);
     $activeProfile->setInitialTime(microtime(true));
     if (method_exists($this, 'beforeStartProfile') === true) {
         $this->beforeStartProfile($activeProfile);
     }
     $this->_activeProfile = $activeProfile;
     return $this;
 }