Get analysables that have been already processed.

@return \stdClass[]
481171
protected function get_processed_analysables(): array {
        global $DB;

        $params = array('modelid' => $this->analyser->get_modelid());
        $params['action'] = ($this->includetarget) ? 'training' : 'prediction';
        $select = 'modelid = :modelid and action = :action';

        // Weird select fields ordering for performance (analysableid key matching, analysableid is also unique by modelid).
        return $DB->get_records_select('analytics_used_analysables', $select,
            $params, 'timeanalysed DESC', 'analysableid, modelid, action, firstanalysis, timeanalysed, id AS primarykey');
    }
956868
public static function get_reports()
    {
        $reports = ClassInfo::subclassesFor(get_called_class());

        $reportsArray = [];
        if ($reports && count($reports) > 0) {
            $excludedReports = static::get_excluded_reports();
            // Collect reports into array with an attribute for 'sort'
            foreach ($reports as $report) {
                // Don't use the Report superclass, or any excluded report classes
                if (in_array($report, $excludedReports)) {
                    continue;
                }
                $reflectionClass = new ReflectionClass($report);
                // Don't use abstract classes
                if ($reflectionClass->isAbstract()) {
                    continue;
                }

                /** @var Report $reportObj */
                $reportObj = $report::create();
                if ($reportObj->hasMethod('sort')) {
                    // Use the sort method to specify the sort field
                    $reportObj->sort = $reportObj->sort();
                }
                $reportsArray[$report] = $reportObj;
            }
        }

        uasort($reportsArray, function ($a, $b) {
            if ($a->sort == $b->sort) {
                return 0;
            } else {
                return ($a->sort < $b->sort) ? -1 : 1;
            }
        });

        return $reportsArray;
    }
225425
public function managerGetRegistrations()
    {
        $theRegistrations = [];

        /* @var $procedure \Thruway\Procedure */
        foreach ($this->procedures as $procedure) {
            /* @var $registration \Thruway\Registration */
            foreach ($procedure->getRegistrations() as $registration) {
                $theRegistrations[] = [
                    'id'         => $registration->getId(),
                    'name'       => $registration->getProcedureName(),
                    'session'    => $registration->getSession()->getSessionId(),
                    'statistics' => $registration->getStatistics()
                ];
            }
        }

        return [$theRegistrations];
    }
611359
public function getStatistics()
    {
        return [
            'currentCallCount'       => count($this->calls),
            'registeredAt'           => $this->registeredAt,
            'invocationCount'        => $this->invocationCount,
            'invocationAverageTime'  => $this->invocationAverageTime,
            'busyTime'               => $this->busyTime,
            'busyStart'              => $this->busyStart,
            'lastIdledAt'            => $this->lastIdledAt,
            'lastCallStartedAt'      => $this->lastCallStartedAt,
            'completedCallTimeTotal' => $this->completedCallTimeTotal
        ];
    }
1015098
public function getAll()
    {
        return array(
            self::DEVELOPMENT => self::DEVELOPMENT,
            self::TESTING     => self::TESTING,
            self::STAGING     => self::STAGING,
            self::PRODUCTION  => self::PRODUCTION,
            );
    }
1245982
public function processAbandonedCarts()
    {
        $result = [];
        $stores = $this->helper->getStores();
        $this->acPendingContactUpdater->update();

        foreach ($stores as $store) {
            $storeId = $store->getId();
            $websiteId = $store->getWebsiteId();

            $result = $this->processAbandonedCartsForCustomers($storeId, $websiteId, $result);
            $result = $this->processAbandonedCartsForGuests($storeId, $websiteId, $result);
        }

        return $result;
    }
1346832
private function getProxyMethods(): array
    {
        if (null !== $this->reflectionProxyMethods) {
            return $this->reflectionProxyMethods;
        }

        $proxyMethods = [];
        $methods = $this->getClassMethods();

        foreach ($methods as $method) {
            $docComment = $method->getDocComment();

            if (\strpos($docComment, 'Transactional') !== false) {
                $annotation = $this->annotationReader->getMethodAnnotation(
                    $method,
                    Transactional::class
                );

                if ($annotation) {
                    $proxyMethods[] = $method;
                }
            }
        }

        $this->reflectionProxyMethods = $proxyMethods;

        return $proxyMethods;
    }
1270711
public function getAll(): array
    {
        $this->rewind();
        $allValues = [];
        while ($this->valid()) {
            $allValues[] = $this->getCurrentElement()->getValue();
            $this->next();
        }
        return $allValues;
    }
600531
public static function getConstants() : array
    {
        if (self::$constCacheArray == null) {
            self::$constCacheArray = [];
        }
        $calledClass = get_called_class();
        if (!array_key_exists($calledClass, self::$constCacheArray)) {
            $reflect = new ReflectionClass($calledClass);
            self::$constCacheArray[$calledClass] = $reflect->getConstants();
        }
        return self::$constCacheArray[$calledClass];
    }
672587
protected function getCacheData(): array
    {
        $data = array(
            'data'  => array(),
        );

        foreach (get_declared_classes() as $class)
        {
            $reflector = new \ReflectionClass($class);

            if ($this->isCorrectAbstractItem($reflector) && $this->isCorrectItem($reflector))
                $data = $this->pushClassData($data, $reflector);
        }

        return $data;
    }
768691
private function getDescriptors(): array
    {
        if ($this->input instanceof \Iterator) {
            $this->input->rewind();
        }
        if ('\\' === \DIRECTORY_SEPARATOR) {
            $this->processPipes = new WindowsPipes($this->input, !$this->outputDisabled || $this->hasCallback);
        } else {
            $this->processPipes = new UnixPipes($this->isTty(), $this->isPty(), $this->input, !$this->outputDisabled || $this->hasCallback);
        }

        return $this->processPipes->getDescriptors();
    }
255788
protected function getProcessedFiles()
    {
        $sql = "SELECT * FROM `".$this->tableName."` ORDER BY `id` ASC;";
        try {
            $arrResult = $this->getAllRows();
        } catch (PDOException $ex) {
            echo $ex->getMessage().PHP_EOL;
            return;
        }
        
        foreach ($arrResult as $row) {
            $this->knownUpdateFiles[$row['id']] = $row['folder'].$row['name'];
        }
    }
801451
protected function get_preprocessors() : array {
        return array_merge(
            parent::get_preprocessors(),
            [
                'forum' => new extract_record_preprocessor(self::TABLE, $this->get_table_alias()),
                'course_module' => new extract_record_preprocessor('course_modules', 'cm_'),
                'course' => new extract_record_preprocessor('course', 'c_'),
                'context' => new extract_context_preprocessor(),
            ]
        );
    }
223656
public function behaviors()
    {
        return [
            'blameable' => [
                'class' => BlameableBehavior::className(),
                'createdByAttribute' => 'createdBy',
                'updatedByAttribute' => 'updatedBy',
            ],
            'timestamp' => [
                'class' => TimestampBehavior::className(),
                'attributes' => [
                    ActiveRecord::EVENT_BEFORE_INSERT => ['createdAt'],
                    ActiveRecord::EVENT_BEFORE_UPDATE => ['updatedAt']
                ]
            ],
            'purify' => [
                'class' => PurifyBehavior::className(),
                'attributes' => ['content']
            ]
        ];
    }
241098
public function get(): array {

        // We join the datasets by time splitting method.
        $timesplittingresults = array();
        foreach ($this->resultsbytimesplitting as $timesplittingid => $results) {
            if (empty($timesplittingresults[$timesplittingid])) {
                $timesplittingresults[$timesplittingid] = [];
            }
            $timesplittingresults[$timesplittingid] += $results;
        }

        return $timesplittingresults;
    }
952319
public function toArray()
	{
		return [
			'points' => SerializationHelper::serialize($this->points),
			'extensions' => SerializationHelper::serialize($this->extensions),
			'stats' => SerializationHelper::serialize($this->stats)
		];
	}
1076004
public static function getCachedMethods(): array
    {
        return [
            'getTypePrefix' => true,
            'getType' => true,
            'getFlexDirectory' => true,
            'getCacheKey' => true,
            'getCacheChecksum' => true,
            'getTimestamp' => true,
            'hasProperty' => true,
            'getProperty' => true,
            'hasNestedProperty' => true,
            'getNestedProperty' => true,
            'orderBy' => true,

            'render' => false,
            'isAuthorized' => 'session',
            'search' => true,
            'sort' => true,
        ];
    }