转换最终分词结果到 finallyResult 数组
@return void
668
private function _sort_finally_result()
    {
          $newarr = array();
        $i = 0;
        foreach($this->simpleResult as $k=>$v)
        {
            if( empty($v['w']) ) continue;
            if( isset($this->finallyResult[$k]) && count($this->finallyResult[$k]) > 0 )
            {
                foreach($this->finallyResult[$k] as $w)
                {
                    if(!empty($w))
                    {
                        $newarr[$i]['w'] = $w;
                        $newarr[$i]['t'] = 20;
                        $i++;
                    }
                }
            }
            else if($v['t'] != 21)
            {
                $newarr[$i]['w'] = $v['w'];
                $newarr[$i]['t'] = $v['t'];
                $i++;
            }
        }
        $this->finallyResult = $newarr;
        $newarr = '';
      }
508834
public function finalize()
    {
        $this->query = array_filter($this->query, function ($value) {
            return !empty($value) || is_bool($value) || is_numeric($value);
        });

        return $this;
    }
845850
public function finish(){
        $this->running = 0;
        $this->success = 1;
        $this->last_execution_time = self::execution_time();
        
        if ($this->save()){
            Console::stdout(Console::ansiFormat("*** finished ".$this->controller."/".$this->action." (time: " . sprintf("%.3f", $this->last_execution_time) . "s)\n\n", [Console::FG_GREEN]));
            return true;
        }else{
            Console::stdout(Console::ansiFormat("*** failed to finish ".$this->controller."/".$this->action." (time: " . sprintf("%.3f", $this->last_execution_time) . "s)\n\n", [Console::FG_RED]));
            return false;
        }
    }
342642
public function results()
    {

        if ($this->classname) {
            $orderAdapter = app(\Antares\Datatables\Adapter\OrderAdapter::class);
            $orderAdapter->setClassname($this->classname);
            $orderAdapter->setEngineInstance($this);

            $groupsFilterAdapter = app(\Antares\Datatables\Adapter\GroupsFilterAdapter::class);
            $groupsFilterAdapter->setClassname($this->classname);
            $groupsFilterAdapter->setEngineInstance($this);
        }
        return $this->query->get();
    }
380969
public function first()
    {
        $results = $this->get();

        if (is_array($results) && array_key_exists(0, $results)) {
            return $results[0];
        }

        // No entries were returned, return false
        return false;
    }
239596
protected function _resolve()
    {
        if (!$this->_deferred) {
            return;
        }
        $data = $this->_deferred;

        $instance = $data['instance'];
        $this->_not = $data['not'];
        $boolean = $instance->resolve();
        $data['description'] = $instance->description();
        $data['backtrace'] = $instance->backtrace();
        $this->_log($boolean, $data);

        $this->_deferred = null;
    }
286769
public function complete()
    {
        $cfg = $this->form->cfg;
        $return = true;
        if ($cfg['onComplete'] == 'email') {
            $return = $this->email();
        } elseif ($cfg['onComplete'] == 'log') {
            $return = $this->log();
        } elseif (\is_callable($cfg['onComplete'])) {
            $return = \call_user_func($cfg['onComplete'], $this->form);
        }
        return $return;
    }
415980
public function onResultDone()
    {
        $this->rsState = self::RS_STATE_HEADER;
        $this->onResponse->executeOne($this, true);
        $this->checkFree();
        $this->resultRows = [];
        $this->resultFields = [];
    }
181644
public function execute()
    {
        // clean up
        $cleanUpResult = $this->cleanUpIndex();

        // initialize for re-indexing
            /** @var Queue $indexQueue */
        $indexQueue = GeneralUtility::makeInstance(Queue::class);
        $indexQueueInitializationResults = $indexQueue->getInitializationService()
            ->initializeBySiteAndIndexConfigurations($this->getSite(), $this->indexingConfigurationsToReIndex);

        return ($cleanUpResult && !in_array(false, $indexQueueInitializationResults));
    }
1318879
public function complete($value = null)
    {
        if (null !== $this->started) {
            $this->started->reject(new CompletedError());
        }

        $this->delayed->resolve($value);
    }
401771
public function free_result()
	{
		if (is_object($this->result_id))
		{
			$this->result_id->free();
			$this->result_id = FALSE;
		}
	}
1333966
public function finalize()
	{
		$tag = $this->getTag();

		if (!isset($tag->template))
		{
			$tag->template = $this->getTemplate();
		}
	}
196097
public function process()
    {
        $this->getVisitor();
        $this->saveVisitor();

        if (!$this->visitor->hasUserId() && !Yii::$app->user->isGuest) {
            $this->visitor->setUserId(Yii::$app->user->identity->getId());
        }

        if ($this->detectFirstVisitSource) {

        }

        if ($this->detectAllVisitsSources) {

        }

        if ($this->storeLastActivity) {
            $this->visitor->save();
        }

        if ($this->storeVisitedPages) {

        }
    }
419701
public function process(&$return = null)
    {
        if ($this->_passed === null) {
            $this->_process();
        }
        $return = $this->_return;
        return $this->_passed;
    }
531569
public function first()
    {
        $this->limit(1);
        $result = $this->get();
        return empty($result) ? null : $result[0];
    }
515077
public function next()
    {
        $this->lastMatch = $this->find($this->searchIndex);

        if ($this->lastMatch === null) {
            $this->state = 'DONE';
        } else {
            $this->searchIndex = $this->lastMatch->end();
            $this->state = 'READY';
        }

        $this->searchIndex++;
    }
970680
public function init()
    {
        if ($this->countRows < 1) {
            $this->totalPages = 0;
            $this->currentPage = 0;

            return;
        }

        if ($this->limit < 10) {
            $this->limit = 10;
        }

        $this->totalPages = (int)($this->countRows / $this->limit);

        if ($this->countRows % $this->limit) {
            $this->totalPages++;
        }

        if ($this->totalPages === 0) {
            $this->totalPages = 1;
        }

        if ($this->currentPage < 0) {
            $this->currentPage = 0;
        }

        if ($this->currentPage > $this->totalPages) {
            $this->currentPage = $this->totalPages;
        }
    }