Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | public function getDocument() |
||
40 | { |
||
41 | if ($this->document instanceof Document) { |
||
42 | return $this->document; |
||
43 | } else { |
||
44 | $this->document = $this->storage->getDocuments()->getDocumentBySlug(substr($this->documentPath, 1)); |
||
45 | if ($this->document !== false) { |
||
|
|||
46 | $this->document->dbHandle = $this->storage->getContentDbHandle(); |
||
47 | $this->document->documentStorage = $this->storage->getDocuments(); |
||
48 | } |
||
49 | |||
50 | return $this->document; |
||
51 | } |
||
58 | } |