/** * 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; }
/** * 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; }