|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* @license LGPLv3, https://opensource.org/licenses/LGPL-3.0 |
|
5
|
|
|
* @copyright Aimeos (aimeos.org), 2015-2025 |
|
6
|
|
|
* @package Base |
|
7
|
|
|
* @subpackage DB |
|
8
|
|
|
*/ |
|
9
|
|
|
|
|
10
|
|
|
|
|
11
|
|
|
namespace Aimeos\Base\DB\Connection; |
|
12
|
|
|
|
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Dummy database connection class. |
|
16
|
|
|
* |
|
17
|
|
|
* @package Base |
|
18
|
|
|
* @subpackage DB |
|
19
|
|
|
*/ |
|
20
|
|
|
class None |
|
21
|
|
|
extends \Aimeos\Base\DB\Connection\Base |
|
22
|
|
|
implements \Aimeos\Base\DB\Connection\Iface |
|
23
|
|
|
{ |
|
24
|
|
|
/** |
|
25
|
|
|
* Closes the connection to the database server |
|
26
|
|
|
* |
|
27
|
|
|
* @return \Aimeos\Base\DB\Connection\Iface Connection instance for method chaining |
|
28
|
|
|
*/ |
|
29
|
|
|
public function close() : Iface |
|
30
|
|
|
{ |
|
31
|
|
|
throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' ); |
|
32
|
|
|
} |
|
33
|
|
|
|
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* Connects (or reconnects) to the database server |
|
37
|
|
|
* |
|
38
|
|
|
* @return \Aimeos\Base\DB\Connection\Iface Connection instance for method chaining |
|
39
|
|
|
*/ |
|
40
|
|
|
public function connect() : Iface |
|
41
|
|
|
{ |
|
42
|
|
|
throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' ); |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* Creates a database statement. |
|
48
|
|
|
* |
|
49
|
|
|
* Throws an exception because there is no implementation available. |
|
50
|
|
|
* |
|
51
|
|
|
* @param string $sql SQL statement, maybe with place holders |
|
52
|
|
|
* @throws \Aimeos\Base\DB\Exception |
|
53
|
|
|
*/ |
|
54
|
|
|
public function create( string $sql ) : \Aimeos\Base\DB\Statement\Iface |
|
55
|
|
|
{ |
|
56
|
|
|
throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' ); |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
|
|
60
|
|
|
/** |
|
61
|
|
|
* Returns the underlying connection object |
|
62
|
|
|
* |
|
63
|
|
|
* Throws an exception because there is no implementation available. |
|
64
|
|
|
* |
|
65
|
|
|
* @throws \Aimeos\Base\DB\Exception |
|
66
|
|
|
*/ |
|
67
|
|
|
public function getRawObject() |
|
68
|
|
|
{ |
|
69
|
|
|
throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' ); |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* Starts a transaction for this connection. |
|
75
|
|
|
* |
|
76
|
|
|
* Throws an exception because there is no implementation available. |
|
77
|
|
|
* |
|
78
|
|
|
* @throws \Aimeos\Base\DB\Exception |
|
79
|
|
|
*/ |
|
80
|
|
|
public function begin() : Iface |
|
81
|
|
|
{ |
|
82
|
|
|
throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' ); |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* Commits the changes done inside of the transaction to the storage. |
|
88
|
|
|
* |
|
89
|
|
|
* Throws an exception because there is no implementation available. |
|
90
|
|
|
* |
|
91
|
|
|
* @throws \Aimeos\Base\DB\Exception |
|
92
|
|
|
*/ |
|
93
|
|
|
public function commit() : Iface |
|
94
|
|
|
{ |
|
95
|
|
|
throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' ); |
|
96
|
|
|
} |
|
97
|
|
|
|
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* Discards the changes done inside of the transaction. |
|
101
|
|
|
* |
|
102
|
|
|
* Throws an exception because there is no implementation available. |
|
103
|
|
|
* |
|
104
|
|
|
* @throws \Aimeos\Base\DB\Exception |
|
105
|
|
|
*/ |
|
106
|
|
|
public function rollback() : Iface |
|
107
|
|
|
{ |
|
108
|
|
|
throw new \Aimeos\Base\DB\Exception( 'This method is not implemented' ); |
|
109
|
|
|
} |
|
110
|
|
|
} |
|
111
|
|
|
|