[ 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($active); 28 29 /** 30 * 31 * Returns true if logging is active. 32 * 33 * @return bool 34 * 35 */ 36 public function isActive(); 37 38 /** 39 * 40 * Returns the underlying logger instance. 41 * 42 * @return \Psr\Log\LoggerInterface 43 * 44 */ 45 public function getLogger(); 46 47 /** 48 * 49 * Returns the level at which to log profile messages. 50 * 51 * @return string 52 * 53 */ 54 public function getLogLevel(); 55 56 /** 57 * 58 * Level at which to log profile messages. 59 * 60 * @param string $logLevel A PSR LogLevel constant. 61 * 62 * @return null 63 * 64 */ 65 public function setLogLevel($logLevel); 66 67 /** 68 * 69 * Returns the log message format string, with placeholders. 70 * 71 * @return string 72 * 73 */ 74 public function getLogFormat(); 75 76 /** 77 * 78 * Sets the log message format string, with placeholders. 79 * 80 * @param string $logFormat 81 * 82 * @return null 83 * 84 */ 85 public function setLogFormat($logFormat); 86 87 /** 88 * 89 * Starts a profile entry. 90 * 91 * @param string $function The function starting the profile entry. 92 * 93 * @return null 94 * 95 */ 96 public function start($function); 97 98 /** 99 * 100 * Finishes and logs a profile entry. 101 * 102 * @param string $statement The statement being profiled, if any. 103 * 104 * @param array $values The values bound to the statement, if any. 105 * 106 * @return null 107 * 108 */ 109 public function finish($statement = null, array $values = []); 110 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sat Feb 22 05:10:06 2025 | Cross-referenced by PHPXref 0.7.1 |