当前位置: 首页>>代码示例>>PHP>>正文


PHP Client::__construct方法代码示例

本文整理汇总了PHP中Elastica\Client::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::__construct方法的具体用法?PHP Client::__construct怎么用?PHP Client::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Elastica\Client的用法示例。


在下文中一共展示了Client::__construct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor. Appends the default index name to the config array, which by default
  * is `_all`
  *
  * @param array $config config options
  * @param callback $callback Callback function which can be used to be notified
  * about errors (for example connection down)
  */
 public function __construct(array $config = [], $callback = null)
 {
     $config += ['index' => '_all'];
     if (isset($config['name'])) {
         $this->configName = $config['name'];
     }
     parent::__construct($config, $callback);
 }
开发者ID:edukondaluetg,项目名称:elastic-search,代码行数:16,代码来源:Connection.php

示例2: __construct

 /**
  * Initializes search engine config and index name.
  */
 public function __construct()
 {
     $this->_helper = Mage::helper('bubble_search/elasticsearch');
     $config = $this->_helper->getEngineConfigData();
     parent::__construct($config);
     if (!isset($config['index'])) {
         Mage::throwException('Index must be defined for search engine client.');
     }
     $this->setIndex($config['index']);
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:13,代码来源:Client.php

示例3: __construct

 public function __construct()
 {
     $this->_helper = Mage::helper('nanowebg_elasticsearch/elasticsearch');
     $config = $this->_helper->getEngineConfig();
     if (Mage::helper('nanowebg_elasticsearch')->isLog()) {
         Mage::log('Initiating NanoWebG_ElasticSearch_Model_Resource_Elasticsearch_Client', null, 'elasticsearch_debug.log');
     }
     parent::__construct($config);
     if (!isset($config['index'])) {
         Mage::throwException('Index must be defined for search engine client.');
     }
     $this->setIndex($config['index']);
 }
开发者ID:javik223,项目名称:Evron-Magento,代码行数:13,代码来源:Client.php

示例4: __construct

 /**
  * Constructor
  *
  * @param array           $options
  * @param LoggerInterface $logger
  */
 public function __construct(array $options, LoggerInterface $logger)
 {
     if (isset($options['servers'])) {
         $resolver = new OptionsResolver();
         $this->globalOptions($resolver);
         foreach ($options['servers'] as $index => $opts) {
             $options['servers'][$index] = $resolver->resolve($opts);
         }
     }
     $resolver = new OptionsResolver();
     $this->globalOptions($resolver);
     $options = $resolver->resolve($options);
     parent::__construct($options);
     $this->setLogger($logger);
 }
开发者ID:wikibusiness,项目名称:elastica-bundle,代码行数:21,代码来源:ElasticaClient.php

示例5: __construct

 public function __construct(\MagentoHackathon\Elasticsearch\Helper\ElasticOptionInterface $option, array $config = array(), $callback = null)
 {
     $this->_configHelper = $option;
     parent::__construct($config, $callback);
 }
开发者ID:vadimjustus,项目名称:m2-elasticsearch,代码行数:5,代码来源:Elastic.php

示例6: __construct

 /**
  * Set the Elasticsearch Node Connection Data
  *
  * @var array
  */
 public final function __construct($options)
 {
     $config = array('servers' => Mage::helper('elasticgento/config')->getElasticsearchNodeConnectionData());
     //call elastica constructor
     parent::__construct($config);
 }
开发者ID:Mohitsahu123,项目名称:Elasticgento,代码行数:11,代码来源:Client.php


注:本文中的Elastica\Client::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。