ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
BaseEntity.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\WebDAV\Entity;
22
23use Sabre\DAV\INode;
25
29abstract class BaseEntity implements INode, Entity
30{
31 public function __construct(
32 protected Factory $factory,
33 protected string $path,
34 protected ?Proxy $object_proxy = null
35 ) {
36 }
37
38 public function delete(): void
39 {
40 $this->factory->delete($this);
41 }
42
43 public function getName(): string
44 {
45 return $this->object_proxy?->getName() ?? '';
46 }
47
48 public function setName($name): string
49 {
50 $this->object_proxy?->setName($name);
51 $this->factory->rename($this);
52 return $name;
53 }
54
55 public function getLastModified(): ?int
56 {
57 return $this->object_proxy?->getLastModified();
58 }
59
60 public function getObjectProxy(): ?Proxy
61 {
62 return $this->object_proxy;
63 }
64
65 public function getPath(): string
66 {
67 return $this->path;
68 }
69
70}
factory()
__construct(protected Factory $factory, protected string $path, protected ?Proxy $object_proxy=null)
Definition: BaseEntity.php:31
$path
Definition: ltiservices.php:30