Definition at line 31 of file Query.php.
◆ __construct()
__construct |
( |
|
$query, |
|
|
|
$queryType |
|
) |
| |
Class constructor. A query is about to be started, save the query text ($query) and its type (one of the Zend_Db_Profiler::* constants).
- Parameters
-
string | $query | |
integer | $queryType | |
- Returns
- void
Definition at line 79 of file Query.php.
82 $this->_queryType = $queryType;
◆ __clone()
Clone handler for the query object.
- Returns
- void
Definition at line 91 of file Query.php.
93 $this->_boundParams = array();
94 $this->_endedMicrotime =
null;
◆ bindParam()
bindParam |
( |
|
$param, |
|
|
|
$variable |
|
) |
| |
- Parameters
-
string | $param | |
mixed | $variable | |
- Returns
- void
Definition at line 156 of file Query.php.
◆ bindParams()
bindParams |
( |
array |
$params | ) |
|
- Parameters
-
- Returns
- void
Definition at line 165 of file Query.php.
167 if (array_key_exists(0,
$params)) {
bindParam($param, $variable)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ end()
Ends the query and records the time so that the elapsed time can be determined later.
- Returns
- void
Definition at line 116 of file Query.php.
118 $this->_endedMicrotime = microtime(
true);
◆ getElapsedSecs()
Get the elapsed time (in seconds) that the query ran. If the query has not yet ended, false is returned.
- Returns
- float|false
Definition at line 190 of file Query.php.
192 if (
null === $this->_endedMicrotime) {
◆ getQuery()
Get the original SQL text of the query.
- Returns
- string
Definition at line 136 of file Query.php.
◆ getQueryParams()
◆ getQueryType()
◆ getStartedMicrotime()
Get the time (in seconds) when the profiler started running.
- Returns
- bool|float
Definition at line 204 of file Query.php.
206 if(
null === $this->_startedMicrotime) {
◆ hasEnded()
Returns true if and only if the query has ended.
- Returns
- boolean
Definition at line 126 of file Query.php.
128 return $this->_endedMicrotime !==
null;
◆ start()
Starts the elapsed time click ticking. This can be called subsequent to object creation, to restart the clock. For instance, this is useful right before executing a prepared query.
- Returns
- void
Definition at line 106 of file Query.php.
108 $this->_startedMicrotime = microtime(
true);
◆ $_boundParams
◆ $_endedMicrotime
◆ $_query
◆ $_queryType
◆ $_startedMicrotime
$_startedMicrotime = null |
|
protected |
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Db/Profiler/Query.php