コード例 #1
0
ファイル: Documents.php プロジェクト: segseriy/solrsearch
 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;
 }
コード例 #2
0
 function docs_from_string($doc_name)
 {
     return Documentable::from_string($this->test_docs[$doc_name], $doc_name);
 }
コード例 #3
0
 function post_process()
 {
     $this->default_value = ltrim($this->default_value);
     parent::post_process();
 }
コード例 #4
0
ファイル: DocumentStore.php プロジェクト: skylei/modern-php
 public function addDocument(Documentable $document)
 {
     $key = $document->getId();
     $value = $document->getContent();
     $this->data[$key] = $value;
 }
コード例 #5
0
ファイル: pdoc.php プロジェクト: jcartledge/pdoc
 private function parse_file($file)
 {
     return Documentable::from_file($file);
 }