Returns the global throttles collection.

@return \Illuminate\Database\Eloquent\Collection
510097
protected function getGlobalThrottles()
    {
        if ($this->globalThrottles === null) {
            $this->globalThrottles = $this->loadGlobalThrottles();
        }

        return $this->globalThrottles;
    }
1174337
public function getAll()
    {
        $result = $this->callService('GET', self::API_DOWNLOAD);

        return $result->getModels(models\Download\Task::class);
    }
1162450
public function getCollection()
    {
        $collection = trim(str_replace('\\', '_', $this->collection), '_');
        return $this->$collection()
            ->setDatabase($this->database)
            ->setTable($this->table)
            ->setModel($this->model)
            ->set($this->getRows());
    }
1369162
public function getRouteCollection()
    {
        if (is_null($this->routeCollection)) {
            $this->routeCollection = new RouteCollection();
            $this->initRoutes();
        }

        return $this->routeCollection;
    }
584692
public static function getCollectors()
    {
        $collectorClassList = ClassMapGenerator::createMap(base_path().'/vendor/abuseio');
        /** @noinspection PhpUnusedParameterInspection */
        $collectorClassListFiltered = array_where(
            array_keys($collectorClassList),
            function ($value, $key) {
                // Get all collectors, ignore all other packages.
                if (strpos($value, 'AbuseIO\Collectors\\') !== false) {
                    return $value;
                }
                return false;
            }
        );

        $collectors = [];
        $collectorList = array_map('class_basename', $collectorClassListFiltered);
        foreach ($collectorList as $collector) {
            if (!in_array($collector, ['Factory', 'Collector'])) {
                $collectors[] = $collector;
            }
        }
        return $collectors;
    }
797975
public function getCollection()
    {
        $queueDatabase = $this->database;
        $queueResource = $this->collection;
        $db = $this->getAdapter();

        return $db->$queueDatabase->$queueResource;
    }
1279274
public function getGroupActionCollection()
	{
		if (!$this->group_action_collection) {
			$this->group_action_collection = new GroupAction\GroupActionCollection($this);
		}

		return $this->group_action_collection;
	}
853718
public function getRouteCollection()
    {
        if (($this->otherSite && $this->isMultiLanguage($this->otherSite['host'])) || !$this->otherSite && $this->isMultiLanguage()) {
            if (!$this->routeCollectionMultiLanguage) {
                $this->routeCollectionMultiLanguage = new RouteCollection();

                $this->addMultiLangPreviewRoute();
                $this->addMultiLangSlugRoute();
            }

            return $this->routeCollectionMultiLanguage;
        } elseif (!$this->routeCollection) {
            $this->routeCollection = new RouteCollection();

            $this->addPreviewRoute();
            $this->addSlugRoute();
        }

        return $this->routeCollection;
    }
992091
public function getTops(): Collection
    {
        $this->repo->makeModel();
        return $this->repo->pushCriteria(new GetTops())->all([
            'id',
            'pid',
            'root_id',
            'deep',
            'name',
            'sort',
        ]);
    }
1186902
private function &getCollection()
    {
        if (null === $this->collection) {
            $qb = $this->createAndFilterQueryBuilder($this->getEntityAlias());
            if ($this->isHydrationDisabled()) {
                $this->collection = $qb->getQuery()->getScalarResult();
            } else {
                $this->collection = $qb->getQuery()->getResult();
            }
        }
        return $this->collection;
    }
1334314
protected function getGlobalMiddleWareHandlers(): Generator
    {
        // select global middleware from routes
        foreach ($this->selectClasses($this->getRoutesPath(), RoutesConfiguratorInterface::class) as $selectClass) {
            /** @var RoutesConfiguratorInterface $selectClass */
            foreach ($selectClass::getMiddleware() as $middlewareClass) {
                $handler = [$middlewareClass, MiddlewareInterface::MIDDLEWARE_METHOD_NAME];
                yield $handler;
            }
        }

        // select global middleware from providers
        $interfaceName = ProvidesMiddlewareInterface::class;
        foreach ($this->selectClassImplements($this->getProviderClasses(), $interfaceName) as $providerClass) {
            /** @var ProvidesMiddlewareInterface $providerClass */
            foreach ($providerClass::getMiddleware() as $middlewareClass) {
                $handler = [$middlewareClass, MiddlewareInterface::MIDDLEWARE_METHOD_NAME];
                yield $handler;
            }
        }
    }
1069150
protected function throttle()
    {
        if ($this->isThrottled($this->conn, 'onOpen')) {
            $this->console->info(sprintf('Connection throttled: %d', $this->conn->resourceId));
            $this->conn->send(trans('ratchet::messages.tooManyConnectionAttempts'));
            $this->throttled = true;
            $this->conn->close();
        }

        return $this;
    }
512468
public function throttle()
    {
        if ((time() - $this->lastCpuCheck) >= $this->cpuCheckFrequency) {
            $load = sys_getloadavg();
            
            if ($load[0]/$this->cpuCount >= $this->cpuTarget) {
                $this->pause += $this->throttleSensitivity;
                $this->controller->notify('Daemon throttling down');
            } else {
                $this->pause -= $this->throttleSensitivity;
                $this->controller->notify('Daemon throttling up');
            }

            $this->lastCpuCheck = time();
        }

        // Never allow pause to dip below 1 microsecond
        if ($this->pause < 1) {
            $this->pause = 1;
        }

        return $this->pause;
    }
106773
protected function getPermissions()
    {
        try {
            return $this->cache->rememberForever('permissions.policies', function () {
                return Permission::with('roles')->get();
            });
        } catch (\Exception $exception) {
            $this->cache->forget('permissions.policies');

            return new Collection;
        }
    }
798568
public function getEnabledDrivers()
    {
        $drivers = $this->getDriversFromStorage();
        $enabled = new Collection();

        foreach ($this->getAvailableDrivers() as $driver) {
            $name = $driver->getName();

            if (isset($drivers[$name])) {
                $enabled->put($name, $driver);
            }
        }

        return $enabled;
    }
1005799
public function getCollection()
    {
        if (! isset($this->collection)) {
            return str_replace(
                '\\', '', Str::snake(Str::plural(class_basename($this)))
            );
        }

        return $this->collection;
    }
419178
public function collection()
    {
        if (!empty($this->response['data'])) {
            $data = [];

            foreach ($this->response['data'] as $object) {
                $data[] = new Fluent($this->resource, $object);
            }

            return $data;
        }

        return [];
    }