None::close()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
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