Reads Log File and returns Lines.
@access		public
@param		int			$offset		Offset from Start or End
@param		int			$limit		Amount of Entries to return
@return		array
170338
public function read( $offset = NULL, $limit = NULL )
	{
		return $this->load( $this->fileName, $offset, $limit );
	}
1029925
public function find($limit = 20, $offset = 0)
	{
		return $this->buildFind()
			->setLimit($limit)
			->setOffset($offset)
			->find();
	}
401917
public function limit($limit, $offset = null)
    {
        $self              = self::getInstance();
        $offset            = (!empty($offset)) ? 'OFFSET '.$offset : null;
        $self->optionLimit = " LIMIT {$limit} ".$offset;

        return $self;
    }
985753
public function getItems($offset, $limit)
    {
        $this
            ->paginator
            ->getQuery()
            ->setFirstResult($offset)
            ->setMaxResults($limit)
        ;

        return iterator_to_array($this->paginator->getIterator());
    }
244797
public function getLog($limit = null, $skip = null)
    {
        $arguments  = array(
            '--xml',
            '--revision'    => 'HEAD:0'
        );


        $skip   = ($skip === null) ? 0 : (int)$skip;
        if ($limit !== null) {
            $arguments['--limit']    = (int)($limit + $skip);
        }

        /** @var $result CallResult */
        $result = $this->getSvn()->{'log'}($this->getRepositoryPath(), $arguments);
        $result->assertSuccess(sprintf('Cannot retrieve log from "%s"',
            $this->getRepositoryPath()
        ));

        $xml    = simplexml_load_string($result->getStdOut());
        if (!$xml) {
            throw new \RuntimeException(sprintf('Cannot read log XML for "%s"', $this->getRepositoryPath()));
        }
        $logEntries = new \ArrayIterator($xml->xpath('/log/logentry'));

        if ($limit !== null) {
            $logEntries = new \LimitIterator($logEntries, $skip, $limit);
        }

        $log = array();
        foreach ($logEntries as $item) {
            $log[]   = array(
                (string)$item['revision'],
                (string)$item->author,
                (string)$item->date,
                (string)$item->msg
            );
        }
        return $log;
    }
1299323
public List<String> fetch(int offset, int limit) {
        E.illegalArgumentIf(offset < 0, "offset must not be negative number");
        E.illegalArgumentIf(offset >= lines(), "offset is out of range: " + offset);
        E.illegalArgumentIf(limit < 1, "limit must be at least 1");
        BufferedReader reader = IO.buffered(IO.reader(file));
        try {
            for (int i = 0; i < offset; ++i) {
                if (null == reader.readLine()) {
                    break;
                }
            }
        } catch (IOException e) {
            throw E.ioException(e);
        }
        List<String> lines = new ArrayList<>();
        try {
            for (int i = 0; i < limit; ++i) {
                String line = reader.readLine();
                if (null == line) {
                    break;
                }
                lines.add(line);
            }
        } catch (IOException e) {
            throw E.ioException(e);
        }
        return lines;
    }
1327499
public function findAllPaginated($offset = null, $limit = null)
    {
        $qb = $this
            ->createQueryBuilder('w')
            ->orderBy('w.id')
            ->setMaxResults($limit);
        if ($offset) {
            $qb->setFirstResult($offset);
        }

        return $qb->getQuery()->getResult();
    }
482202
public function listTrashed($offset, $limit, array $sort = null)
    {
        $query = $this->handler->createSelectQuery();
        $query
            ->select('*')
            ->from($this->handler->quoteTable('ezcontentobject_trash'));

        $sort = $sort ?: array();
        foreach ($sort as $condition) {
            $sortDirection = $condition->direction === Query::SORT_ASC ? SelectQuery::ASC : SelectQuery::DESC;
            switch (true) {
                case $condition instanceof SortClause\Location\Depth:
                    $query->orderBy('depth', $sortDirection);
                    break;

                case $condition instanceof SortClause\Location\Path:
                    $query->orderBy('path_string', $sortDirection);
                    break;

                case $condition instanceof SortClause\Location\Priority:
                    $query->orderBy('priority', $sortDirection);
                    break;

                default:
                    // Only handle location related sort clauses. The others
                    // require data aggregation which is not sensible here.
                    // Since also criteria are yet ignored, because they are
                    // simply not used yet in eZ Publish, we skip that for now.
                    throw new RuntimeException('Unhandled sort clause: ' . get_class($condition));
            }
        }

        if ($limit !== null) {
            $query->limit($limit, $offset);
        }

        $statement = $query->prepare();
        $statement->execute();

        $rows = array();
        while ($row = $statement->fetch(\PDO::FETCH_ASSOC)) {
            $rows[] = $row;
        }

        return $rows;
    }
1056476
public function read(
        string $sheet = ClientInterface::DEFAULT_SHEET,
        string $range = ClientInterface::DEFAULT_RANGE,
        int $offset = ClientInterface::DEFAULT_OFFSET,
        int $limit = ClientInterface::DEFAULT_LIMIT
    ): array {
        return $this->doRead($this->file, $sheet, $range, $offset, $limit);
    }
702759
public function readLinesBetween(int $start, int $end) : array
    {
        $content = file($this->_path);
        $lines   = [];

        for($i = $start; $i < $end; $i++) {
            if(isset($content[$i])) {
                $lines[] = $content[$i];
            }
        }

        return $lines;
    }
1147407
public function loadAllLocations($offset, $limit)
    {
        $rows = $this->locationGateway->loadAllLocationsData($offset, $limit);

        return $this->locationMapper->createLocationsFromRows($rows);
    }
331010
public function getItems($offset, $limit, $sort = null)
    {
        $items = [];
        $cnt = count($this->rawData);
        for ($i = $offset; $i < $offset + $limit && $i < $cnt; $i++) {
            $items[] = $this->rawData[$i];
        }

        return $items;
    }
631416
final public function limit($limit,$offset=null) {
      if (is_numeric($limit) || is_array($limit)) {
         if(is_array($limit)) {
            $temp   = $limit;
            $limit  =  $temp[0];
            $offset = @$temp[1];
         }

         $this->limit = " LIMIT {$limit} ";

         if(is_numeric($offset)) {
            $this->offset( $offset );
         }
         $this->find_first_data = $this->find_save_data = $this->find_delete_data = FALSE;

         $this->get_instance();
         return $this;
      }

      return null;
   }
950366
private function normalizeOffsetAndLimit($offset = 0, $limit = 25)
    {
        $offset = (int) $offset;
        $limit = (int) $limit;

        $offset = max($offset, 0);
        $limit = min(max($limit, 0), 25);

        return [$offset, $limit];
    }
839507
public function getList( $reverse = FALSE, $limit = 0 )
	{
		return $this->read( $this->fileName, $reverse, $limit );
	}
1342208
public function get_logs($limitfrom = 0, $limitnum = 0) {
        global $DB;

        \core_analytics\manager::check_can_manage_models();

        return $DB->get_records('analytics_models_log', array('modelid' => $this->get_id()), 'timecreated DESC', '*',
            $limitfrom, $limitnum);
    }
679419
public function getFeaturedStreams($limit = 25, $offset = 0)
    {
        if (!$this->isValidLimit($limit)) {
            throw new InvalidLimitException();
        }

        if (!$this->isValidOffset($offset)) {
            throw new InvalidOffsetException();
        }

        $params = [
            'limit' => intval($limit),
            'offset' => intval($offset),
        ];

        return $this->get('streams/featured', $params);
    }