Solar_Sql_Adapter::_addProfile PHP Méthode

_addProfile() protected méthode

Adds an element to the profile array.
protected _addProfile ( integer $time, string | PDOStatement $spec, array $data = null ) : void
$time integer The microtime when the profile element started.
$spec string | PDOStatement The SQL statement being profiled.
$data array Any data bound into the statement.
Résultat void
    protected function _addProfile($time, $spec, $data = null)
    {
        if (!$this->_profiling) {
            return;
        }
        if ($spec instanceof PDOStatement) {
            $conn = $spec->solar_conn;
            $stmt = $spec->queryString;
        } else {
            $conn = null;
            $stmt = $spec;
        }
        $timespan = microtime(true) - $time;
        $e = new Exception();
        $this->_profile[] = array('time' => $timespan, 'stmt' => $stmt, 'data' => $data, 'conn' => $conn, 'trace' => $e->getTraceAsString());
    }