Total Complexity | 7 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
23 | class Model |
||
24 | { |
||
25 | /** |
||
26 | * Configuration. |
||
27 | * |
||
28 | * @var Configuration |
||
29 | */ |
||
30 | private $_conf; |
||
31 | |||
32 | /** |
||
33 | * Data storage. |
||
34 | * |
||
35 | * @var Data\AbstractData |
||
36 | */ |
||
37 | private $_store = null; |
||
38 | |||
39 | /** |
||
40 | * Factory constructor. |
||
41 | * |
||
42 | * @param configuration $conf |
||
43 | */ |
||
44 | 144 | public function __construct(Configuration $conf) |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * Get a paste, optionally a specific instance. |
||
51 | * |
||
52 | * @param string $pasteId |
||
53 | * @return Paste |
||
54 | */ |
||
55 | 112 | public function getPaste($pasteId = null) |
|
62 | } |
||
63 | |||
64 | /** |
||
65 | * Checks if a purge is necessary and triggers it if yes. |
||
66 | */ |
||
67 | 33 | public function purge() |
|
73 | } |
||
74 | } |
||
75 | |||
76 | /** |
||
77 | * Gets, and creates if neccessary, a store object |
||
78 | * |
||
79 | * @return Data\AbstractData |
||
80 | */ |
||
81 | 121 | public function getStore() |
|
90 |