public function addDocument(Documentable $document) { $content = $document->getContent(); $name = $document->getName(); $id = $this->mysqlInsert('documents', ['name' => $name, 'content' => $content]); var_dump($id); if (!empty($id)) { $response = $this->addDocumentToSearch($id, $content); } return $response; }
function docs_from_string($doc_name) { return Documentable::from_string($this->test_docs[$doc_name], $doc_name); }
function post_process() { $this->default_value = ltrim($this->default_value); parent::post_process(); }
public function addDocument(Documentable $document) { $key = $document->getId(); $value = $document->getContent(); $this->data[$key] = $value; }
private function parse_file($file) { return Documentable::from_file($file); }