Exemplo n.º 1
0
 /**
  * @brief Construct new AFS query object.
  * @param $afs_query [in] instance used for initialization (default:
  *        create new empty instance).
  */
 public function __construct(AfsQuery $afs_query = null)
 {
     parent::__construct($afs_query);
     if ($afs_query != null) {
         $this->facet_mgr = $afs_query->facet_mgr->copy();
         foreach ($afs_query->filter as $filter) {
             $this->filter[] = clone $filter;
         }
         if (!is_null($afs_query->page)) {
             $this->page = clone $afs_query->page;
         }
         if (!is_null($afs_query->lang)) {
             $this->lang = clone $afs_query->lang;
         }
         foreach ($afs_query->sort as $sort) {
             $this->sort[] = clone $sort;
         }
         $this->facetDefault = $afs_query->facetDefault->copy();
         if (!is_null($afs_query->cluster)) {
             $this->cluster = clone $afs_query->cluster;
         }
         $this->maxClusters = $afs_query->maxClusters;
         $this->overspill = $afs_query->overspill;
         if (!is_null($afs_query->count)) {
             $this->count = clone $afs_query->count;
         }
         $this->advancedFilter = $afs_query->advancedFilter;
         $this->ftsDefault = $afs_query->ftsDefault;
         $this->clientData = $afs_query->clientData;
         $this->nativeFunctionFilter = $afs_query->nativeFunctionFilter;
     } else {
         $this->facet_mgr = new AfsFacetManager();
         $this->lang = new AfsLanguage(null);
         $this->facetDefault = new AfsFacetDefault();
         $this->auto_set_from = false;
         $this->page = new AfsSingleValueParameter('page', 1);
     }
 }
Exemplo n.º 2
0
 private function get_aggregated_additional_parameters()
 {
     return array_merge(AfsQueryBase::get_additional_parameters(), $this->get_additional_parameters());
 }