123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?php
- namespace OC\Diagnostics;
- use OCP\Diagnostics\IQuery;
- class Query implements IQuery {
- private $sql;
- private $params;
- private $start;
- private $end;
- private $stack;
-
- public function __construct($sql, $params, $start, array $stack) {
- $this->sql = $sql;
- $this->params = $params;
- $this->start = $start;
- $this->stack = $stack;
- }
- public function end($time) {
- $this->end = $time;
- }
-
- public function getParams() {
- return $this->params;
- }
-
- public function getSql() {
- return $this->sql;
- }
-
- public function getStart() {
- return $this->start;
- }
-
-
- public function getDuration() {
- return $this->end - $this->start;
- }
- public function getStartTime() {
- return $this->start;
- }
- public function getStacktrace() {
- return $this->stack;
- }
- }
|