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


PHP Search::__construct方法代码示例

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


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

示例1: __construct

 public function __construct(array $config)
 {
     parent::__construct($config);
     Kohana::load(Kohana::find_file('vendors', 'sphinxapi'));
     $this->_client = new SphinxClient();
     $this->_client->SetServer($this->config('host'), $this->config('port'));
 }
开发者ID:ortodesign,项目名称:cms,代码行数:7,代码来源:sphinx.php

示例2: __construct

 /**
  * Rewrite construct to init some debug parameters.
  */
 protected function __construct($profile)
 {
     $sphinx_config = parent::__construct($profile);
     // Init Debug:
     $this->query_debug['current_query'] = 0;
     $this->query_debug = array_merge($this->query_debug, $sphinx_config);
 }
开发者ID:ninodafonte,项目名称:SIFO,代码行数:10,代码来源:Search.php

示例3: __construct

 /**
  * __construct function.
  *
  * @access public
  * @param  int $id
  * @return void
  */
 public function __construct($modelId)
 {
     $result = Database::select('albums', '*', "id={$modelId}");
     $this->record = $result->fetchAssoc();
     if (!$this->record) {
         header("HTTP/1.0 404 Not Found");
         throw new \Exception("Album #" . intval($modelId) . " not found.");
     }
     parent::__construct($this->record['term']);
 }
开发者ID:fulldecent,项目名称:cameralife,代码行数:17,代码来源:Tag.php

示例4: __construct

 /**
  * SearchConfig constructor.
  * @param array $config The parsed configuration for this search
  */
 public function __construct($config)
 {
     parent::__construct();
     // setup schemas and columns
     if (!empty($config['schemas'])) {
         foreach ($config['schemas'] as $schema) {
             $this->addSchema($schema[0], $schema[1]);
         }
     }
     if (!empty($config['cols'])) {
         foreach ($config['cols'] as $col) {
             $this->addColumn($col);
         }
     }
     // cache flag setting
     $this->cacheFlag = self::$CACHE_DEFAULT;
     if (!empty($config['filters'])) {
         $this->cacheFlag = $this->determineCacheFlag($config['filters']);
     }
     // apply dynamic paramters
     $this->dynamicParameters = new SearchConfigParameters($this);
     $config = $this->dynamicParameters->updateConfig($config);
     // configure search from configuration
     if (!empty($config['filter'])) {
         foreach ($config['filter'] as $filter) {
             $this->addFilter($filter[0], $this->applyFilterVars($filter[2]), $filter[1], $filter[3]);
         }
     }
     if (!empty($config['sort'])) {
         foreach ($config['sort'] as $sort) {
             $this->addSort($sort[0], $sort[1]);
         }
     }
     if (!empty($config['limit'])) {
         $this->setLimit($config['limit']);
     }
     if (!empty($config['offset'])) {
         $this->setOffset($config['offset']);
     }
     $this->config = $config;
 }
开发者ID:cosmocode,项目名称:dokuwiki-plugin-struct,代码行数:45,代码来源:SearchConfig.php

示例5: OAuthConsumer

 function __construct()
 {
     parent::__construct();
     $this->consumer = new OAuthConsumer("dj0yJmk9SlhmUUg0d2xZeElpJmQ9WVdrOWNtaERNM0pUTnpJbWNHbzlNVGM0TXpreE1ESTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD1lMQ--", "3dc05893bab0fc05cbcff4c10c3da27d1a21140d");
 }
开发者ID:soitun,项目名称:C30440_SoftwareProjectDandySearch,代码行数:5,代码来源:model.php

示例6: __construct

 public function __construct($subject, $constraints)
 {
     parent::__construct($subject, $constraints);
     $this->db->orderby('name', 'asc');
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:5,代码来源:Search_Name.php

示例7: __construct

 public function __construct($query)
 {
     parent::__construct($query);
 }
开发者ID:fulldecent,项目名称:cameralife,代码行数:4,代码来源:TagCollection.php

示例8: __construct

 /**
  * Constructor, load parent constructor.
  * Initalizes columns and load post states.
  */
 protected function __construct()
 {
     parent::__construct();
 }
开发者ID:sybrew,项目名称:the-seo-framework,代码行数:8,代码来源:doing-it-right.class.php

示例9: __construct

 /**
  * __construct function.
  *
  * @access public
  * @param  string $path (default: '/')
  * @return void
  */
 public function __construct($path)
 {
     parent::__construct();
     $this->path = '/' . trim($path, '/');
     $this->id = $path;
 }
开发者ID:fulldecent,项目名称:cameralife,代码行数:13,代码来源:Folder.php

示例10: __construct

 public function __construct($constraints)
 {
     parent::__construct('papers', $constraints);
     $this->db->orderby('name', 'asc');
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:5,代码来源:Search_Papers.php


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