コード例 #1
0
ファイル: profiler.php プロジェクト: roadrunner/php-profiler
 /**
  * Start a new sql query
  *
  * This method is used to tell the profiler to track an sql query.  These are treated differently than step nodes
  *
  * @param string $query the query that you are running (used in the output of the profiler so you can view the query run)
  *
  * @return ProfilerSQLNode|ProfilerGhostNode returns an instance of the {@link ProfilerGhostNode} if profiler is enabled, or {@link ProfilerGhostNode} if disabled
  */
 public static function sqlStart($query)
 {
     if (!self::isEnabled()) {
         return self::$ghostNode;
     }
     $sqlProfile = new ProfilerSQLNode($query, self::$currentNode);
     self::$currentNode->sqlStart($sqlProfile);
     return $sqlProfile;
 }
コード例 #2
0
 /**
  * Start a new sql query
  *
  * This method is used to tell the profiler to track an sql query. These are treated differently than step nodes
  *
  * @param string $query
  *        	the query that you are running (used in the output of the profiler so you can view the query run)
  *        	
  * @return ProfilerSQLNode|ProfilerGhostNode returns an instance of the {@link ProfilerGhostNode} if profiler is enabled, or {@link ProfilerGhostNode} if disabled
  */
 public static function sqlStart($query)
 {
     if (!self::isEnabled()) {
         return self::$ghostNode;
     }
     if (false == self::$currentNode) {
         self::start("Profiler Default Top Level");
     }
     $sqlProfile = new ProfilerSQLNode($query, self::$currentNode);
     self::$currentNode->sqlStart($sqlProfile);
     return $sqlProfile;
 }