Returns the name of the provided predictions processor.

@param \core_analytics\predictor $predictionsprocessor
@return string
431916
public static function get_predictions_processor_name(\core_analytics\predictor $predictionsprocessor) {
            $component = substr(get_class($predictionsprocessor), 0, strpos(get_class($predictionsprocessor), '\\', 1));
        return get_string('pluginname', $component);
    }
1088124
private function _cpuinfo()
    {
        $ncpu = 0;
        $tcpu = "";
        $vcpu = "";
        $ccpu = "";
        $scpu = "";
        foreach ($this->readaixdata() as $line) {
            if (preg_match("/^Number Of Processors:\s+(\d+)/", $line, $ar_buf)) {
                $ncpu = $ar_buf[1];
            }
            if (preg_match("/^Processor Type:\s+(.+)/", $line, $ar_buf)) {
                $tcpu = $ar_buf[1];
            }
            if (preg_match("/^Processor Version:\s+(.+)/", $line, $ar_buf)) {
                $vcpu = $ar_buf[1];
            }
            if (preg_match("/^CPU Type:\s+(.+)/", $line, $ar_buf)) {
                $ccpu = $ar_buf[1];
            }
            if (preg_match("/^Processor Clock Speed:\s+(\d+)\s/", $line, $ar_buf)) {
                $scpu = $ar_buf[1];
            }
        }
        for ($i = 0; $i < $ncpu; $i++) {
            $dev = new CpuDevice();
            if (trim($tcpu) != "") {
                $cpu = trim($tcpu);
                if (trim($vcpu) != "") $cpu .= " ".trim($vcpu);
                if (trim($ccpu) != "") $cpu .= " ".trim($ccpu);
                $dev->setModel($cpu);
            }
            if (trim($scpu) != "") {
                $dev->setCpuSpeed(trim($scpu));
            }
            $this->sys->setCpus($dev);
        }
    }
882493
public function getName()
    {
        $bytes = $this->numberHelper->getBytes(static::MINIMUM_RECOMMENDED_MEMORY);

        return t('Memory limit %s.', $this->numberHelper->formatSize($bytes));
    }
450761
protected function getIncrementalProcessOutput(Process $process): string
    {
        // Get the last stdout output from the process.
        $incrementalOutput = $process->getIncrementalOutput();

        // Get the last error output from the process.
        $incrementalErrorOutput = $process->getIncrementalErrorOutput();

        if ($incrementalErrorOutput != '') {
            $incrementalOutput = $incrementalErrorOutput;
        }

        // Make sure the output does not contain unwanted ansi escape sequences.
        return $this->sanitizeOutput($incrementalOutput);
    }
1284065
public function index(Processor $processor)
    {
        $this->breadcrumb->onSecurity();
        $data = $processor->index();
        return view('antares/foundation::settings.security.index', $data);
    }
1070319
private function prediction_info(\core_analytics\prediction $prediction) {
        global $OUTPUT;

        $predictionactions = $this->target->prediction_actions($prediction, true, true);

        // For FORMAT_PLAIN.
        $fullmessageplaintext  = '';

        // For FORMAT_HTML.
        $messageactions  = [];
        $insighturl = null;
        foreach ($predictionactions as $action) {
            $actionurl = $action->get_url();
            if (!$actionurl->get_param('forwardurl')) {

                $actiondoneurl = new \moodle_url('/report/insights/done.php');
                // Set the forward url to the 'done' script.
                $actionurl->param('forwardurl', $actiondoneurl->out(false));
            }

            if (empty($insighturl)) {
                // We use the primary action url as insight url so we log that the user followed the provided link.
                $insighturl = $action->get_url();
            }
            $actiondata = (object)['url' => $action->get_url()->out(false), 'text' => $action->get_text()];
            $fullmessageplaintext .= get_string('insightinfomessageaction', 'analytics', $actiondata) . PHP_EOL;
            $messageactions[] = $actiondata;
        }

        $fullmessagehtml = $OUTPUT->render_from_template('core_analytics/insight_info_message_prediction',
            ['actions' => $messageactions]);
        return [$insighturl, $fullmessageplaintext, $fullmessagehtml];
    }
57063
protected function _getProcessor($path)
    {
        if (!$path) {
            return;
        }

        if (!is_array(static::$processorcache)) {
            static::$processorcache = array();
        }

        if (array_key_exists($path, static::$processorcache)) {
            return static::$processorcache[$path];
        }

        foreach ($this->processors as &$processor) {

            /* @var $processor AbstractFileProcessor */
            $config = $processor->getConfig();

            if (preg_match($config['file'], $path)) {
                static::$processorcache[$path] = $processor;

                return $processor;
            }
        }
    }
1009858
public function processParameter($parameter)
    {
        foreach ($this->getParameterProcessors() as $processor) {
            if ($processor->doesHandle($parameter)) {
                return $processor->process($parameter);
            }
        }

        return $parameter;
    }
860075
public function getProcessor($name)
    {
        return isset($this->processors[$name]) ? $this->processors[$name] : false;
    }
302903
public function getInputName()
    {
        $key = $this->grid->getInputProcessor()->getKey();
        $name = $this->config->getId();
        return "{$key}[filters][{$name}]";
    }
475377
public function getProcessorId()
    {
        if (-1 === $this->index || !$this->valid()) {
            return null;
        }

        return $this->processors[$this->index][0];
    }
1100388
public function extractPsr0ClassName()
    {
        $shortName = $this->parseFileForPsr0ClassShortName();

        return new PhpName(
            ltrim($this->parseFileForPsr0NamespaceName() . '\\' . $shortName, '\\'),
            $shortName
        );
    }
187874
private function _get_Win32_Processor()
    {
        if ($this->_Win32_Processor === null) $this->_Win32_Processor = CommonFunctions::getWMI($this->_wmi, 'Win32_Processor', array('LoadPercentage', 'AddressWidth', 'Name', 'L2CacheSize', 'L3CacheSize', 'CurrentClockSpeed', 'ExtClock', 'NumberOfCores', 'NumberOfLogicalProcessors', 'MaxClockSpeed'));
        return $this->_Win32_Processor;
    }
1253900
protected function parseRouteProcessor()
    {
        $frameworkProcessors = $this->builder->processors();

        $translator = $this->routeTranslator();
        return $frameworkProcessors->httpParseRoute($translator);
    }
135528
public function getProcessor()
    {
        if (is_null($this->processor)) {
            $processor = oxNew(\OxidEsales\PayPalModule\Model\IPNProcessor::class);
            $this->setProcessor($processor);
        }

        return $this->processor;
    }
888692
public function getTableName()
    {
        if ($this->tableName) {
            return $this->tableName;
        }

        return $this->namingStrategy->classToTableName($this->name);
    }
649640
protected function prepare_prediction_record($sampleid, $rangeindex, $prediction, $predictionscore, $calculations) {
        $context = $this->get_analyser()->sample_access_context($sampleid);

        $record = new \stdClass();
        $record->modelid = $this->model->id;
        $record->contextid = $context->id;
        $record->sampleid = $sampleid;
        $record->rangeindex = $rangeindex;
        $record->prediction = $prediction;
        $record->predictionscore = $predictionscore;
        $record->calculations = $calculations;
        $record->timecreated = time();

        $analysable = $this->get_analyser()->get_sample_analysable($sampleid);
        $timesplitting = $this->get_time_splitting();
        $timesplitting->set_analysable($analysable);
        $range = $timesplitting->get_range_by_index($rangeindex);
        if ($range) {
            $record->timestart = $range['start'];
            $record->timeend = $range['end'];
        }

        return array($record, $context);
    }