1 | <?php |
||
29 | class Admin extends AbstractAdmin |
||
30 | { |
||
31 | /** |
||
32 | * Path to the root node in the repository under which documents of this |
||
33 | * admin should be created. |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | private $rootPath; |
||
38 | |||
39 | /** |
||
40 | * Set the root path in the repository. To be able to create new items, |
||
41 | * this path must already exist. |
||
42 | * |
||
43 | * @param string $rootPath |
||
44 | */ |
||
45 | public function setRootPath($rootPath): void |
||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | public function getRootPath() |
||
57 | |||
58 | /** |
||
59 | * @param string $context |
||
60 | * |
||
61 | * @return ProxyQueryInterface |
||
62 | */ |
||
63 | public function createQuery($context = 'list') |
||
74 | |||
75 | /** |
||
76 | * @param object $object |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | public function id($object) |
||
84 | |||
85 | /** |
||
86 | * Get subject. |
||
87 | * |
||
88 | * Overridden to allow a broader set of valid characters in the ID, and |
||
89 | * if the ID is not a UUID, to call absolutizePath on the ID. |
||
90 | * |
||
91 | * @return mixed |
||
92 | */ |
||
93 | public function getSubject() |
||
94 | { |
||
95 | if (null === $this->subject && $this->request) { |
||
96 | $id = $this->request->get($this->getIdParameter()); |
||
97 | if (null === $id || !preg_match('#^[0-9A-Za-z/\-_]+$#', $id)) { |
||
98 | $this->subject = false; |
||
|
|||
99 | } else { |
||
100 | if (!UUIDHelper::isUUID($id)) { |
||
101 | $id = PathHelper::absolutizePath($id, '/'); |
||
102 | } |
||
103 | $this->subject = $this->getObject($id); |
||
104 | } |
||
105 | } |
||
106 | |||
107 | return $this->subject; |
||
108 | } |
||
109 | |||
110 | /** |
||
111 | * {@inheritdoc} |
||
112 | */ |
||
113 | public function toString($object) |
||
132 | |||
133 | protected function configureRoutes(RouteCollection $collection): void |
||
141 | } |
||
142 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..