コード例 #1
0
ファイル: Search.php プロジェクト: N3m1s/ElasticsearchBundle
 /**
  * Returns endpoint instance.
  *
  * @param string $type Endpoint type.
  *
  * @return SearchEndpointInterface
  */
 private function getEndpoint($type)
 {
     if (!array_key_exists($type, $this->endpoints)) {
         $this->endpoints[$type] = SearchEndpointFactory::get($type);
     }
     return $this->endpoints[$type];
 }
コード例 #2
0
 /**
  * Tests get method exception.
  *
  * @expectedException \RuntimeException
  */
 public function testGet()
 {
     SearchEndpointFactory::get('foo');
 }