1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* This file is part of the Sonata Project package. |
7
|
|
|
* |
8
|
|
|
* (c) Thomas Rabaix <[email protected]> |
9
|
|
|
* |
10
|
|
|
* For the full copyright and license information, please view the LICENSE |
11
|
|
|
* file that was distributed with this source code. |
12
|
|
|
*/ |
13
|
|
|
|
14
|
|
|
namespace Sonata\NewsBundle\Model; |
15
|
|
|
|
16
|
|
|
use Sonata\CoreBundle\Model\ManagerInterface; |
17
|
|
|
use Sonata\NewsBundle\Exception\NoDriverException; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @internal |
21
|
|
|
* |
22
|
|
|
* @author Christian Gripp <[email protected]> |
23
|
|
|
*/ |
24
|
|
|
final class NoDriverManager implements ManagerInterface |
|
|
|
|
25
|
|
|
{ |
26
|
|
|
public function getClass() |
27
|
|
|
{ |
28
|
|
|
throw new NoDriverException(); |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
public function findAll() |
32
|
|
|
{ |
33
|
|
|
throw new NoDriverException(); |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @param int|null $limit |
38
|
|
|
* @param int|null $offset |
39
|
|
|
*/ |
40
|
|
|
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) |
41
|
|
|
{ |
42
|
|
|
throw new NoDriverException(); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
public function findOneBy(array $criteria, array $orderBy = null) |
46
|
|
|
{ |
47
|
|
|
throw new NoDriverException(); |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @param mixed $id |
52
|
|
|
*/ |
53
|
|
|
public function find($id) |
54
|
|
|
{ |
55
|
|
|
throw new NoDriverException(); |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
public function create() |
59
|
|
|
{ |
60
|
|
|
throw new NoDriverException(); |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @param object $entity |
65
|
|
|
* @param bool $andFlush |
66
|
|
|
*/ |
67
|
|
|
public function save($entity, $andFlush = true) |
68
|
|
|
{ |
69
|
|
|
throw new NoDriverException(); |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @param object $entity |
74
|
|
|
* @param bool $andFlush |
75
|
|
|
*/ |
76
|
|
|
public function delete($entity, $andFlush = true) |
77
|
|
|
{ |
78
|
|
|
throw new NoDriverException(); |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
public function getTableName() |
82
|
|
|
{ |
83
|
|
|
throw new NoDriverException(); |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
public function getConnection() |
87
|
|
|
{ |
88
|
|
|
throw new NoDriverException(); |
89
|
|
|
} |
90
|
|
|
} |
91
|
|
|
|
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.