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')); }
/** * 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); }
/** * __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']); }
/** * 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; }
function __construct() { parent::__construct(); $this->consumer = new OAuthConsumer("dj0yJmk9SlhmUUg0d2xZeElpJmQ9WVdrOWNtaERNM0pUTnpJbWNHbzlNVGM0TXpreE1ESTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD1lMQ--", "3dc05893bab0fc05cbcff4c10c3da27d1a21140d"); }
public function __construct($subject, $constraints) { parent::__construct($subject, $constraints); $this->db->orderby('name', 'asc'); }
public function __construct($query) { parent::__construct($query); }
/** * Constructor, load parent constructor. * Initalizes columns and load post states. */ protected function __construct() { parent::__construct(); }
/** * __construct function. * * @access public * @param string $path (default: '/') * @return void */ public function __construct($path) { parent::__construct(); $this->path = '/' . trim($path, '/'); $this->id = $path; }
public function __construct($constraints) { parent::__construct('papers', $constraints); $this->db->orderby('name', 'asc'); }