1 | <?php |
||
22 | class FileResource extends BaseFileResource implements ResourceInterface |
||
23 | { |
||
24 | protected $resource; |
||
25 | protected $configuration; |
||
26 | protected $alias; |
||
27 | |||
28 | /** |
||
29 | * Constructor. |
||
30 | * |
||
31 | * @param string $resource |
||
32 | * @param ConfigurationInterface $configuration |
||
33 | * @param string $alias |
||
34 | */ |
||
35 | 34 | public function __construct($resource, ConfigurationInterface $configuration = null, $alias = null) |
|
41 | |||
42 | /** |
||
43 | * Creates a FileResource. |
||
44 | * |
||
45 | * @param string $resource |
||
46 | * @param ConfigurationInterface $configuration |
||
47 | * @param string $alias |
||
48 | * |
||
49 | * @return FileResource |
||
50 | */ |
||
51 | 1 | public static function create($resource, ConfigurationInterface $configuration = null, $alias = null) |
|
55 | |||
56 | /** |
||
57 | * Gets configuration. |
||
58 | * |
||
59 | * @return ConfigurationInterface |
||
60 | */ |
||
61 | 30 | public function getConfiguration() |
|
65 | |||
66 | /** |
||
67 | * Sets configuration. |
||
68 | * |
||
69 | * @param ConfigurationInterface $configuration |
||
70 | * |
||
71 | * @return FileResource |
||
72 | */ |
||
73 | 1 | public function setConfiguration(ConfigurationInterface $configuration) |
|
79 | |||
80 | /** |
||
81 | * Returns the resource tied to this Resource. |
||
82 | * |
||
83 | * @return mixed The resource |
||
84 | */ |
||
85 | 34 | public function getResource() |
|
89 | |||
90 | /** |
||
91 | * Sets the resource. |
||
92 | * |
||
93 | * @param string $resource |
||
94 | * |
||
95 | * @return FileResource |
||
96 | */ |
||
97 | 1 | public function setResource($resource) |
|
103 | |||
104 | /** |
||
105 | * Gets an alias (as ConfigCache service name suffix). |
||
106 | * |
||
107 | * @return string |
||
108 | */ |
||
109 | 7 | public function getAlias() |
|
113 | |||
114 | /** |
||
115 | * Sets an alias (as ConfigCache service name suffix). |
||
116 | * |
||
117 | * @param string $alias |
||
118 | * |
||
119 | * @return FileResource |
||
120 | * |
||
121 | * @throws \InvalidArgumentException |
||
122 | */ |
||
123 | 6 | public function setAlias($alias) |
|
132 | |||
133 | /** |
||
134 | * Whether FileResource has an alias or not. |
||
135 | * |
||
136 | * @return bool |
||
137 | */ |
||
138 | 19 | public function hasAlias() |
|
142 | |||
143 | /** |
||
144 | * {@inheritdoc} |
||
145 | */ |
||
146 | 12 | public function exists() |
|
150 | } |
||
151 |