[ 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; 10 11 /** 12 * 13 * Locates PDO connections for default, read, and write databases. 14 * 15 * @package Aura.Sql 16 * 17 */ 18 interface ConnectionLocatorInterface 19 { 20 /** 21 * 22 * Sets the default connection registry entry. 23 * 24 * @param callable $callable The registry entry. 25 * 26 * @return null 27 * 28 */ 29 public function setDefault(callable $callable); 30 31 /** 32 * 33 * Returns the default connection object. 34 * 35 * @return ExtendedPdoInterface 36 * 37 */ 38 public function getDefault(); 39 40 /** 41 * 42 * Sets a read connection registry entry by name. 43 * 44 * @param string $name The name of the registry entry. 45 * 46 * @param callable $callable The registry entry. 47 * 48 * @return null 49 * 50 */ 51 public function setRead($name, callable $callable); 52 53 /** 54 * 55 * Returns a read connection by name; if no name is given, picks a 56 * random connection; if no read connections are present, returns the 57 * default connection. 58 * 59 * @param string $name The read connection name to return. 60 * 61 * @return ExtendedPdoInterface 62 * 63 */ 64 public function getRead($name = ''); 65 66 /** 67 * 68 * Sets a write connection registry entry by name. 69 * 70 * @param string $name The name of the registry entry. 71 * 72 * @param callable $callable The registry entry. 73 * 74 * @return null 75 * 76 */ 77 public function setWrite($name, callable $callable); 78 79 /** 80 * 81 * Returns a write connection by name; if no name is given, picks a 82 * random connection; if no write connections are present, returns the 83 * default connection. 84 * 85 * @param string $name The write connection name to return. 86 * 87 * @return ExtendedPdoInterface 88 * 89 */ 90 public function getWrite($name = ''); 91 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Jan 21 05:10:11 2025 | Cross-referenced by PHPXref 0.7.1 |