diff options
Diffstat (limited to 'apps/dav/lib/Upload/RootCollection.php')
-rw-r--r-- | apps/dav/lib/Upload/RootCollection.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/apps/dav/lib/Upload/RootCollection.php b/apps/dav/lib/Upload/RootCollection.php index 696de064dd8..436792e25ec 100644 --- a/apps/dav/lib/Upload/RootCollection.php +++ b/apps/dav/lib/Upload/RootCollection.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -23,20 +24,31 @@ namespace OCA\DAV\Upload; use Sabre\DAVACL\AbstractPrincipalCollection; +use Sabre\DAVACL\PrincipalBackend; class RootCollection extends AbstractPrincipalCollection { + /** @var CleanupService */ + private $cleanupService; + + public function __construct(PrincipalBackend\BackendInterface $principalBackend, + string $principalPrefix, + CleanupService $cleanupService) { + parent::__construct($principalBackend, $principalPrefix); + $this->cleanupService = $cleanupService; + } + /** * @inheritdoc */ - function getChildForPrincipal(array $principalInfo) { - return new UploadHome($principalInfo); + public function getChildForPrincipal(array $principalInfo): UploadHome { + return new UploadHome($principalInfo, $this->cleanupService); } /** * @inheritdoc */ - function getName() { + public function getName(): string { return 'uploads'; } |