コード例 #1
0
ファイル: ASolrCriteria.php プロジェクト: hezhiwen/YiiSolr
 /**
  * Constructor
  * @param array|null $data the parameters to initialize the criteria with
  */
 public function __construct($data = null)
 {
     parent::__construct();
     if ($data !== null) {
         foreach ($data as $key => $value) {
             $this->{$key} = $value;
         }
     }
 }
コード例 #2
0
ファイル: SwiSolrQuery.php プロジェクト: usamurai/swisolr
 function __construct($param = null)
 {
     if (is_array($param)) {
         $this->searchFields = array();
         foreach ($param as $searchField) {
             if (!$searchField instanceof SolrSearchField) {
                 throw InvalidArgumentException('Invalid search field for the search');
             }
             $this->searchFields[] = $searchField;
         }
     } else {
         if ($param instanceof SolrPrioritySearchField) {
             $this->searchFields = null;
             parent::__construct($param->toQuery());
         } else {
             if (is_string($param)) {
                 $this->searchFields = null;
                 parent::__construct($param);
             } else {
                 throw InvalidArgumentException('Invalid parameter for SwiSolrQuery');
             }
         }
     }
 }
コード例 #3
0
ファイル: Abstract.php プロジェクト: humanoyd/zend-solr
 public function __construct($q = null)
 {
     $this->_client = Zend_Registry::get('solr');
     parent::__construct($q);
 }
コード例 #4
0
 public function __construct($options = null)
 {
     parent::__construct($options);
 }