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\MediaBundle\Model; |
15
|
|
|
|
16
|
|
|
use Sonata\MediaBundle\Exception\NoDriverException; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @internal |
20
|
|
|
* |
21
|
|
|
* @author Andrey F. Mindubaev <[email protected]> |
22
|
|
|
*/ |
23
|
|
|
final class NoDriverManager implements GalleryManagerInterface, MediaManagerInterface |
24
|
|
|
{ |
25
|
|
|
public function getClass(): void |
26
|
|
|
{ |
27
|
|
|
throw new NoDriverException(); |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
public function findAll(): void |
31
|
|
|
{ |
32
|
|
|
throw new NoDriverException(); |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @param int|null $limit |
37
|
|
|
* @param int|null $offset |
38
|
|
|
*/ |
39
|
|
|
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): void |
40
|
|
|
{ |
41
|
|
|
throw new NoDriverException(); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function findOneBy(array $criteria, ?array $orderBy = null): void |
45
|
|
|
{ |
46
|
|
|
throw new NoDriverException(); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @param mixed $id |
51
|
|
|
*/ |
52
|
|
|
public function find($id): void |
53
|
|
|
{ |
54
|
|
|
throw new NoDriverException(); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
public function create(): void |
58
|
|
|
{ |
59
|
|
|
throw new NoDriverException(); |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @param object $entity |
64
|
|
|
* @param bool $andFlush |
65
|
|
|
*/ |
66
|
|
|
public function save($entity, $andFlush = true): void |
67
|
|
|
{ |
68
|
|
|
throw new NoDriverException(); |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @param object $entity |
73
|
|
|
* @param bool $andFlush |
74
|
|
|
*/ |
75
|
|
|
public function delete($entity, $andFlush = true): void |
76
|
|
|
{ |
77
|
|
|
throw new NoDriverException(); |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
public function getTableName(): void |
81
|
|
|
{ |
82
|
|
|
throw new NoDriverException(); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
public function getConnection(): void |
86
|
|
|
{ |
87
|
|
|
throw new NoDriverException(); |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
public function getPager(array $criteria, $page, $limit = 10, array $sort = []) |
91
|
|
|
{ |
92
|
|
|
throw new NoDriverException(); |
93
|
|
|
} |
94
|
|
|
} |
95
|
|
|
|