1 | <?php |
||
24 | abstract class AbstractFilesystemResource extends GenericResource implements FilesystemResource |
||
25 | { |
||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $filesystemPath; |
||
30 | |||
31 | /** |
||
32 | * Creates a new filesystem resource. |
||
33 | * |
||
34 | * @param string $filesystemPath The path on the file system. |
||
35 | * @param string|null $path The repository path of the resource. |
||
36 | */ |
||
37 | 658 | public function __construct($filesystemPath, $path = null) |
|
38 | { |
||
39 | 658 | parent::__construct($path); |
|
40 | |||
41 | 658 | $this->filesystemPath = str_replace(DIRECTORY_SEPARATOR, '/', $filesystemPath); |
|
42 | 658 | } |
|
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | 411 | public function getFilesystemPath() |
|
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | public function getMetadata() |
||
59 | |||
60 | 32 | protected function preSerialize(array &$data) |
|
66 | |||
67 | 24 | protected function postUnserialize(array $data) |
|
73 | } |
||
74 |