private function onApi(Document $document) { $document->setPath(sprintf('api/%s', $document->getPath())); }