protected function prepareCoreMetricsArchive($visits, $visitsConverted)
    {
        $createSeparateArchiveForCoreMetrics = $this->mustProcessVisitCount($visits)
                                && !$this->doesRequestedPluginIncludeVisitsSummary();

        if ($createSeparateArchiveForCoreMetrics) {
            $requestedPlugin = $this->params->getRequestedPlugin();

            $this->params->setRequestedPlugin('VisitsSummary');

            $pluginsArchiver = new PluginsArchiver($this->params, $this->isArchiveTemporary());
            $metrics = $pluginsArchiver->callAggregateCoreMetrics();
            $pluginsArchiver->finalizeArchive();

            $this->params->setRequestedPlugin($requestedPlugin);

            $visits = $metrics['nb_visits'];
            $visitsConverted = $metrics['nb_visits_converted'];
        }

        return array($visits, $visitsConverted);
    }
protected function prepareCoreMetricsArchive($visits, $visitsConverted)
    {
        $createSeparateArchiveForCoreMetrics = $this->mustProcessVisitCount($visits)
                                && !$this->doesRequestedPluginIncludeVisitsSummary();

        if ($createSeparateArchiveForCoreMetrics) {
            $requestedPlugin = $this->params->getRequestedPlugin();

            $this->params->setRequestedPlugin('VisitsSummary');

            $pluginsArchiver = new PluginsArchiver($this->params, $this->isArchiveTemporary());
            $metrics = $pluginsArchiver->callAggregateCoreMetrics();
            $pluginsArchiver->finalizeArchive();

            $this->params->setRequestedPlugin($requestedPlugin);

            $visits = $metrics['nb_visits'];
            $visitsConverted = $metrics['nb_visits_converted'];
        }

        return array($visits, $visitsConverted);
    }
protected function prepareCoreMetricsArchive ( $ visits , $ visitsConverted ) { $ createSeparateArchiveForCoreMetrics = $ this -> mustProcessVisitCount ( $ visits ) && ! $ this -> doesRequestedPluginIncludeVisitsSummary ( ) ; if ( $ createSeparateArchiveForCoreMetrics ) { $ requestedPlugin = $ this -> params -> getRequestedPlugin ( ) ; $ this -> params -> setRequestedPlugin ( 'VisitsSummary' ) ; $ pluginsArchiver = new PluginsArchiver ( $ this -> params , $ this -> isArchiveTemporary ( ) ) ; $ metrics = $ pluginsArchiver -> callAggregateCoreMetrics ( ) ; $ pluginsArchiver -> finalizeArchive ( ) ; $ this -> params -> setRequestedPlugin ( $ requestedPlugin ) ; $ visits = $ metrics [ 'nb_visits' ] ; $ visitsConverted = $ metrics [ 'nb_visits_converted' ] ; } return array ( $ visits , $ visitsConverted ) ; }
Prepares the core metrics if needed.

@param $visits
@return array
Prepares the core metrics if needed .