public static function createDump(Text $text) { $dump = ['id' => $text->getId(), 'title' => $text->getTitle(), 'annotation' => $text->getAnnotation(), 'text' => $text->getText()]; return $dump; }