[ Index ] |
PHP Cross Reference of YOURLS |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of Aura for PHP. 5 * 6 * @license https://opensource.org/licenses/MIT MIT 7 * 8 */ 9 namespace Aura\Sql\Profiler; 10 11 /** 12 * 13 * Interface to send query profiles to a logger. 14 * 15 * @package Aura.Sql 16 * 17 */ 18 interface ProfilerInterface 19 { 20 /** 21 * 22 * Enable or disable profiler logging. 23 * 24 * @param bool $active 25 * 26 */ 27 public function setActive(bool $active); 28 29 /** 30 * 31 * Returns true if logging is active. 32 * 33 * @return bool 34 * 35 */ 36 public function isActive(): bool; 37 38 /** 39 * 40 * Returns the underlying logger instance. 41 * 42 * @return \Psr\Log\LoggerInterface 43 * 44 */ 45 public function getLogger(): \Psr\Log\LoggerInterface; 46 47 /** 48 * 49 * Returns the level at which to log profile messages. 50 * 51 * @return string 52 * 53 */ 54 public function getLogLevel(): string; 55 56 /** 57 * 58 * Level at which to log profile messages. 59 * 60 * @param string $logLevel A PSR LogLevel constant. 61 * 62 * @return void 63 */ 64 public function setLogLevel(string $logLevel): void; 65 66 /** 67 * 68 * Returns the log message format string, with placeholders. 69 * 70 * @return string 71 * 72 */ 73 public function getLogFormat(): string; 74 75 /** 76 * 77 * Sets the log message format string, with placeholders. 78 * 79 * @param string $logFormat 80 * 81 * @return void 82 */ 83 public function setLogFormat(string $logFormat): void; 84 85 /** 86 * 87 * Starts a profile entry. 88 * 89 * @param string $function The function starting the profile entry. 90 * 91 * @return void 92 */ 93 public function start(string $function): void; 94 95 /** 96 * 97 * Finishes and logs a profile entry. 98 * 99 * @param string|null $statement The statement being profiled, if any. 100 * 101 * @param array $values The values bound to the statement, if any. 102 * 103 * @return void 104 */ 105 public function finish(?string $statement = null, array $values = []): void; 106 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Apr 1 05:10:01 2025 | Cross-referenced by PHPXref 0.7.1 |