Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace oat\generis\model\fileReference;
4
5use oat\oatbox\filesystem\FileSystemHandler;
6
7interface FileReferenceSerializer
8{
9    public const SERVICE_ID = 'generis/fileReferenceSerializer';
10
11    /**
12     * Serialize filesystem abstraction to a serial
13     * Abstraction should be \oat\oatbox\filesystem\Directory or \oat\oatbox\filesystem\File
14     *
15     * @param string $abstraction
16     * @return string $serial
17     */
18    public function serialize($abstraction);
19
20    /**
21     * Returns the file/directory serialized
22     *
23     * @param $serial
24     * @return FileSystemHandler
25     */
26    public function unserialize($serial);
27
28    /**
29     * Get the \oat\oatbox\filesystem\File associated to the serial
30     *
31     * @param $serial
32     * @return \oat\oatbox\filesystem\File
33     */
34    public function unserializeFile($serial);
35
36    /**
37     * Get the \oat\oatbox\filesystem\Directory associated to the serial
38     *
39     * @param $serial
40     * @return \oat\oatbox\filesystem\Directory
41     */
42    public function unserializeDirectory($serial);
43
44    /**
45     * Delete the reference
46     * @param $serial
47     * @return boolean
48     */
49    public function cleanUp($serial);
50}