1 | <?php |
||
24 | class FileHistoryManager implements FileHistoryManagerInterface |
||
25 | { |
||
26 | /** |
||
27 | * @var \Doctrine\Common\Persistence\ObjectManager |
||
28 | */ |
||
29 | protected $em; |
||
30 | |||
31 | /** |
||
32 | * @var TokenStorageInterface |
||
33 | */ |
||
34 | protected $tokenStorage; |
||
35 | |||
36 | /** |
||
37 | * @var \Jb\Bundle\FileUploaderBundle\Service\ResolverChain |
||
38 | */ |
||
39 | protected $resolvers; |
||
40 | |||
41 | /** |
||
42 | * @var \Jb\Bundle\FileUploaderBundle\Service\EndpointConfiguration |
||
43 | */ |
||
44 | protected $configuration; |
||
45 | |||
46 | /** |
||
47 | * Constructor |
||
48 | * |
||
49 | * @param ObjectManager $em |
||
50 | * @param TokenStorageInterface $tokenStorage |
||
51 | * @param \Jb\Bundle\FileUploaderBundle\Service\ResolverChain $resolvers |
||
52 | * @param \Jb\Bundle\FileUploaderBundle\Service\EndpointConfiguration $configuration |
||
53 | */ |
||
54 | public function __construct( |
||
65 | |||
66 | /** |
||
67 | * {@inheritDoc} |
||
68 | */ |
||
69 | public function createAndSave($fileName, $originalName, $type, $userId = null) |
||
78 | |||
79 | /** |
||
80 | * {@inheritDoc} |
||
81 | */ |
||
82 | public function create($fileName, $originalName, $type, $userId) |
||
96 | |||
97 | /** |
||
98 | * {@inheritDoc} |
||
99 | */ |
||
100 | public function findOneByFileName($fileName) |
||
104 | |||
105 | /** |
||
106 | * {@inheritDoc} |
||
107 | */ |
||
108 | public function getUrl(FileHistory $fileHistory, $resolverType = 'upload_resolver') |
||
116 | |||
117 | /** |
||
118 | * Get authenticated user id |
||
119 | * |
||
120 | * @return int |
||
121 | */ |
||
122 | protected function getAuthUserId() |
||
136 | } |
||
137 |