Exemplo n.º 1
0
 /**
  * @{inheritDoc}
  */
 public function collect()
 {
     $this->codex = $codex = codex();
     $project = $codex->projects->getActive();
     return ['version' => $codex->getVersion(), 'project' => $project ? $project->getName() : '', 'ref' => $project ? $project->getRef() : '', 'document' => $this->document ? $this->document->getPath() : '', 'data' => $this->data->transform(function ($item) {
         if (!is_string($item)) {
             $item = $this->getDataFormatter()->formatVar($item);
         }
         return $item;
     })->toArray()];
 }
Exemplo n.º 2
0
 protected function addInformationalAttributes(Document $document)
 {
     $document->getFiles()->lastModified($document->getPath());
 }