Returns an array of libraries
@param bool $count
@return array|int
507588
protected function getListReportLibrary($count = false)
    {
        $list = $this->library->getList();
        $this->prepareListLibrary($list);

        $allowed = $this->getAllowedFiltersReportLibrary();

        $this->filterList($list, $allowed, $this->query_filter);
        $this->sortList($list, $allowed, $this->query_filter, array('name' => 'desc'));

        if ($count) {
            return count($list);
        }

        $this->limitList($list, $this->data_limit);
        return $list;
    }
165905
public function readFloats($count)
    {
        $floats = array();

        for ($i = 0; $i < $count; $i++) {
            $float = $this->readFloat();

            if (! is_nan($float)) {
                $floats[] = $float;
            }
        }

        return $floats;
    }
126028
public function stream_read( $count )
    {
        $ret = substr( $this->string, $this->position, $count );
        $this->position += strlen( $ret );
        return $ret;
    }
775216
public function getLibraries(bool $rescan = false): array
    {
        if (!$rescan && !empty(self::$libraries)) {
            return self::$libraries;
        }

        $compiledFile = $this->pathHelper->realize('{MELIOR_BASE}/Data/Persistent/Compiler/Packages/library.map');
        if (!$rescan && is_file($compiledFile)) {
            $result = \unserialize(\file_get_contents($compiledFile));
        } else {
            $result = [];
            $path = $this->pathHelper->realize('{MELIOR_BASE}/Packages/Library/');

            if (!is_dir($path)) {
                return [];
            }

            foreach (scandir($path) as $entry) {
                if ($entry === '.' || $entry === '..') {
                    continue;
                }

                $subpath = $this->pathHelper->join($path, $entry);
                $result = array_merge($result, $this->readPackageFolder($subpath));
            }
        }

        self::$libraries = $result;

        return $result;
    }
1338872
public static function count($count, array $options = []) {

        // TODO: Refactor the options to a dedicated config file.
        $classes = Arr::get($options, 'classes', [
            'positive' => 'label label-info',
            'zero'     => 'label label-default',
            'negative' => 'label label-danger',
        ]);

        return static::generate($count, [
            'class' => $count > 0 ? $classes['positive'] : ($count < 0 ? $classes['negative'] : $classes['zero'])
        ]);
    }
943284
public function getTop5ArticleList($count = null)
    {
        if ($this->_blTop5Action) {
            if ($this->_aTop5ArticleList === null) {
                $this->_aTop5ArticleList = false;
                $config = \OxidEsales\Eshop\Core\Registry::getConfig();
                if ($config->getConfigParam('bl_perfLoadAktion')) {
                    // top 5 articles
                    $artList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
                    $artList->loadTop5Articles($count);
                    if ($artList->count()) {
                        $this->_aTop5ArticleList = $artList;
                    }
                }
            }
        }

        return $this->_aTop5ArticleList;
    }
903401
public static function getList()
    {
        $app = Facade::getFacadeApplication();
        $db = $app->make('database')->connection();
        $libraries = [];
        foreach ($db->fetchAll('select sclHandle from SystemCaptchaLibraries order by sclHandle asc') as $row) {
            $scl = static::getByHandle($row['sclHandle']);
            $libraries[] = $scl;
        }

        return $libraries;
    }
424147
private function getStatementContentAll($count = false)
    {
        $q = $this->connection->createQueryBuilder()
            ->select($count ? 'count(c.id)' : 'c.id')
            ->from('ezcontentobject', 'c')
            ->where('c.status = :status')
            ->setParameter('status', ContentInfo::STATUS_PUBLISHED, PDO::PARAM_INT);

        return $q->execute();
    }
930814
protected function getTokenCharacters($count = 1)
    {
        $result = '';
        for ($i = 0; $i < $count; $i++) {
            $result .= $this->tokenChars[mt_rand(0, count($this->tokenChars) - 1)];
        }
        return $result;
    }
529735
private static function getNumPages(int $limit, int $count): int
    {
        return (int) ceil($count / $limit);
    }
496588
public static function words($count = 3)
    {
        if ($count === 1) {
            return static::$words[array_rand(static::$words, $count)];
        } else {
            return array_intersect_key(static::$words, array_flip(array_rand(static::$words, $count)));
        }
    }
1246746
public function messages(int $count = 200) : array
    {
        $messages = [];

        $messageFields = $this->info($count, true);

        foreach ($messageFields->threadEvents as $message) {
            $messages[] = new Message($this->client, $message->messageEventDetail, $this);
        }

        return $messages;
    }
487572
protected function getSqlForSelect($count = false)
    {
        $parts = $this->sqlParts;

        if (!$parts['select']) {
            $parts['select'] = array('*');
        }

        $query = 'SELECT ' . implode(', ', $parts['select']) . ' FROM ' . $this->getFrom();

        // JOIN
        foreach ($parts['join'] as $join) {
            $query .= ' ' . strtoupper($join['type'])
                . ' JOIN ' . $join['table']
                . ' ON ' . $join['on'];
        }

        $query .= ($parts['where'] !== null ? ' WHERE ' . ((string)$parts['where']) : '')
            . ($parts['groupBy'] ? ' GROUP BY ' . implode(', ', $parts['groupBy']) : '')
            . ($parts['having'] !== null ? ' HAVING ' . ((string)$parts['having']) : '');

        if (false === $count) {
            $query .= ($parts['orderBy'] ? ' ORDER BY ' . implode(', ', $parts['orderBy']) : '')
                . ($parts['limit'] !== null ? ' LIMIT ' . $parts['limit'] : '')
                . ($parts['offset'] !== null ? ' OFFSET ' . $parts['offset'] : '');
        }

        $query .= $this->generateLockSql();

        return $query;
    }
1153034
public static function sentences($count = 3)
    {
        $sentences = array();
        for ($i = 0; $i < $count; $i++) {
            $sentences[] = static::sentence();
        }

        return $sentences;
    }
751428
private function readLinearRings($count)
    {
        $rings = array();

        for ($i = 0; $i < $count; $i++) {
            $rings[] = $this->readPoints($this->readCount());
        }

        return $rings;
    }
375356
public function items($count = false)
    {
        $this->query = $this->model->newQuery();

        return $this->query($count);
    }
898010
public function read(int $count): string
    {
        $data = $this->doRead($this->offset, $count);
        $this->offset += $count;
        return $data;
    }