Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Profiler.php
Go to the documentation of this file.
1 <?php
8 namespace Magento\Framework\DB;
9 
11 {
17  protected $_host = '';
18 
24  protected $_type = '';
25 
31  private $_lastQueryId = null;
32 
39  public function setHost($host)
40  {
41  $this->_host = $host;
42  return $this;
43  }
44 
51  public function setType($type)
52  {
53  $this->_type = $type;
54  return $this;
55  }
56 
64  public function queryStart($queryText, $queryType = null)
65  {
66  $this->_lastQueryId = parent::queryStart($queryText, $queryType);
67  return $this->_lastQueryId;
68  }
69 
76  public function queryEnd($queryId)
77  {
78  $this->_lastQueryId = null;
79  return parent::queryEnd($queryId);
80  }
81 
87  public function queryEndLast()
88  {
89  if ($this->_lastQueryId !== null) {
90  return $this->queryEnd($this->_lastQueryId);
91  }
92 
93  return self::IGNORED;
94  }
95 }
$type
Definition: item.phtml:13
queryStart($queryText, $queryType=null)
Definition: Profiler.php:64