public function __construct($query) { parent::__construct(); $query = !empty($query) ? trim($query) : false; if (!empty($query)) { $this->searchObj = new SearchClass(); $this->indexQuery = $this->searchObj->make_index($query); $this->dataSearch = $this->getDataSearch(); } }