{@inheritDoc}
@see \rocket\ei\component\prop\SortableEiProp::createGlobalSortProp()
@return SortProp
970163
public function buildSortProp(Eiu $eiu): ?SortProp {
		return new SimpleSortProp(CrIt::p($this->getEntityProperty()), $this->getLabelLstr());
	}
1068000
public static function fromGlobals()
    {
        $request = new self();

        foreach ([
            'Accept', 'Accept-Charset', 'Accept-Encoding', 'Accept-Language',
            'Connection', 'Host', 'Referer', 'User-Agent'
        ] as $name) {
            $key = 'HTTP_' . str_replace('-', '_', strtoupper($name));
            if (isset($_SERVER[$key])) {
                $request->setHeader($name, $_SERVER[$key], false);
            }
        }

        $request->_isSecure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off');

        $request->_method = $_SERVER['REQUEST_METHOD'];
        $request->_uri = $_SERVER['REQUEST_URI'];

        $request->_path = strstr($_SERVER['REQUEST_URI'], '?', true);
        if ($request->_path == false) {
            $request->_path = $_SERVER['REQUEST_URI'];
        }
        $request->_query = strstr($_SERVER['REQUEST_URI'], '?');
        if ($request->_query == false) {
            $request->_query = '';
        }

        return $request;
    }
250101
protected function loadGlobalThrottles()
    {
        $interval = Carbon::now()
            ->subSeconds($this->globalInterval);

        return $this->createModel()
            ->newQuery()
            ->where('type', 'global')
            ->where('created_at', '>', $interval)
            ->get();
    }
230557
public static function createFromGlobals()
    {
        $request = new self(@$_SERVER['REQUEST_URI']);
        if (array_key_exists('REQUEST_METHOD', $_SERVER))
        {
            $request->setMethod($_SERVER['REQUEST_METHOD']);
        }
        if ($request->getMethod() == 'POST')
        {
            $request->request->replace($_POST);
        }
        return $request;
    }
244036
public static function getOrCreateGlobalArea($stackName)
    {
        $stack = static::getByName($stackName);
        if (!$stack) {
            $stack = static::addGlobalArea($stackName);
        }

        return $stack;
    }
395907
protected function buildGlobalCode() {
        $result = '';
        foreach ($this->events as $event) {
            /* @var $event \ManiaScript\Builder\Event\AbstractEvent */
            if (!$event->getInline()) {
                $result .= $this->buildHandlerFunction($event);
            }
        }
        return $result;
    }
843761
public function asort(int $sort_flags = 0): self
    {
        $this->generatorToArray();

        \asort($this->array, $sort_flags);

        return $this;
    }
738525
static function createUndefined()
    {
        if ( empty( $GLOBALS['eZOrderStatusUndefined'] ) )
        {
            $row = array(
                'id' => null,
                'status_id' => eZOrderStatus::UNDEFINED,
                'is_active' => true,
                'name' => ezpI18n::tr( 'kernel/shop', 'Undefined' ) );
            $GLOBALS['eZOrderStatusUndefined'] = new eZOrderStatus( $row );
        }
        return $GLOBALS['eZOrderStatusUndefined'];
    }
1096622
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $service = new ReportCollector();

        /** @var Service\Report $reportService */
        $reportService = $serviceLocator->get('KmbPuppetDb\Service\Report');
        $service->setReportService($reportService);

        /** @var QueryBuilderInterface $reportsEnvironmentsQueryBuilder */
        $reportsEnvironmentsQueryBuilder = $serviceLocator->get('KmbPuppetDb\Query\ReportsEnvironmentsQueryBuilder');
        $service->setReportsEnvironmentsQueryBuilder($reportsEnvironmentsQueryBuilder);

        /** @var EnvironmentInterface $permissionEnvironmentService */
        $permissionEnvironmentService = $serviceLocator->get('KmbPermission\Service\Environment');
        $service->setPermissionEnvironmentService($permissionEnvironmentService);

        return $service;
    }
167292
protected function buildSortParameter() {
        $sorts = $this->getIndexCriteria()->getSorts();
        if(!empty($sorts)) {
            $orderBy = '';
            foreach($sorts as $sort) {
                $this->buildSortRecursive($this->getEntityFactory(), $sort->getFields(), $sort->isAsc(), $orderBy);
            }
            $this->getCriteria()->orderBy($orderBy);
        }
    }
493947
static function create( $localeString = false )
    {
        if ( $localeString === false )
        {
            $ini = eZINI::instance();
            $localeString = $ini->variable( 'RegionalSettings', 'Locale' );
        }
        return new eZLocale( $localeString );
    }
1188962
public function createSortorderFromFileList()
    {
        if(file_exists($this->path))
        {
            //SCANDIR_SORT_ASCENDING works for PHP 5.4 and above.
            //Instead of using constant there is 0 for the time being.
            $files = scandir($this->path, 0);

            if(false !== $files)
            {
                $sortorder = array();

                foreach($files as $file)
                {
                    if(!is_dir($this->path . DIRECTORY_SEPARATOR . $file))
                    {
                        $prefix = substr($file, 0, 1);
                        if($prefix != '.' && $prefix != '_')
                        {
                            $sortorder[] = $file;
                        }
                    }
                }

                return $sortorder;
            }
            // @codeCoverageIgnoreStart
            throw new \RuntimeException("Unable to access directory: " . $this->path);
            // @codeCoverageIgnoreEnd
        }
        throw new \InvalidArgumentException("Unable to read sortorder");
    }
949739
private function buildSortParameter() {
        $parameter = new Swagger\Parameter();
        $parameter->setName('sort');
        $parameter->setDescription(
            'Any field on the model can be a sort field. The sort can contain multiple fields, comma separated.
			It is also possible to get a reverse sort by adding a - in front of the field . Optional.'
        );
        $parameter->setParamType('query');
        $parameter->setType('string');

        return $parameter;
    }
585637
public function sort()
    {
        $values = $this->toArray();
        ksort($values);
        
        $this->clear();
        
        foreach($values as $index => $value) {
            $this->set($index,$value);
        }
        
        return $this;
    }
211902
public function sort( bool $desc = false )
	{
		$items = $this->items;
		asort($items);
		if($desc)
		{
			$items = array_reverse($items, true);
		}
		return new static($items);
	}
797316
public function createUriFromGlobal(): UriInterface{
        return $this->createUri(
            $this->resolveScheme()
            . "://"
            . $this->resolveAuthority()
            . $this->resolvePathAndQuery()
        );
    }
1084443
public static function fromGlobals()
  {
    static $instance;

    if (!isset($instance)) {

      $method   = $_SERVER['REQUEST_METHOD'] ?? 'GET';
      $headers  = function_exists('getallheaders') ? getallheaders() : [];
      $uri      = self::getUriFromGlobals();
      $body     = Stream::from(fopen('php://input', 'r+'));
      $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1';
      
      $instance = (new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER))
        ->withCookieParams($_COOKIE)
        ->withQueryParams($_GET)
        ->withUploadedFiles($_FILES);

      $contentType = $instance->getContentType();
      if ($method === 'POST' && (
        false !== stripos($contentType, 'application/x-www-form-urlencoded') ||
        false !== stripos($contentType, 'multipart/form-data')
      )) {
        $instance = $instance->withParsedBody($_POST);
      }
    }

    return $instance;
  }