Gets the number in the series (always returns 0 for batch, special and season, for a collection it returns the first ep in that collection)
@return int
439680
public function getSeriesNumber()
  {
    $type = $this->getMeta('type');

    switch ($type) {
      case 'batch':
      case 'special':
      case 'season':
        return 0;
      case 'ep':
        return $this->getMeta('ep');
      case 'volume':
        return $this->getMeta('volume');
      case 'collection':
        return $this->getMeta('collection')[0];

    }
  }
772054
public function getFirst()
    {
        $first = null;

        if (count($this->renderers) > 0) {
            $first = reset($this->renderers);
        }

        return $first;
    }
801088
public function count()
    {
        if ($this->number !== null) {
            return $this->number;
        }

        $this->number = (int) $this->store->get($this->key);

        if (!$this->number) {
            $this->number = 0;
        }

        return $this->number;
    }
1025937
public function getFirst()
    {
        $first = null;

        if (count($this->objects) > 0) {
            $first = reset($this->objects);
        }

        return $first;
    }
189487
public function first()
    {
        $sql = clone($this);
        $sql->limit(1);
        $collection = $this->query($sql);
        return $collection->isEmpty() ? null : $collection[0];
    }
1033267
public function getRequiredNumber()
    {
        $count = $this->requiredCount - count($this->items);

        // if we have more than we need, then we require 0
        if ($count < 0) {
            $count = 0;
        }

        return $count;
    }
12915
public function getLastPageNumber()
    {
        $this->loadData();
        $count = count($this->filteredData);

        return ceil($count / $this->pageSize);
    }
720016
public function getOrdinal()
	{
		$ordinal = array_search($this->value, array_values(static::toArray()));

		return $ordinal !== false ? $ordinal : -1;
	}
332697
public function getNextNumber()
    {
        if (0 === (int) $this->countTotal()) {
            return 1;
        }

        $qb = $this->getQueryBuilder()
            ->select('MAX(i.invoiceNumber) + 1');

        return $qb->getQuery()
            ->getSingleScalarResult();
    }
1220285
public function first()
    {
        if (!empty($this->data)) {
            if (Collection::count($this->data) > 0) {
                return $this->data[0];
            } else {
                return;
            }
        } else {
            return;
        }
    }
848189
public function getFirst()
    {
        if (is_array($this->queryResult)) {
            $queryResult = &$this->queryResult;
        } else {
            $query = clone $this->query;
            $query->setLimit(1);
            $queryResult = $this->dataMapper->mapToObjects($this->persistenceManager->getObjectDataByQuery($query));
        }
        return (isset($queryResult[0])) ? $queryResult[0] : null;
    }
813382
public function getTotal()
    {
        $query = clone $this->getQuery();
        $query->order = null;
        $query->limit = null;

        return $query->fetchValue('COUNT(*)');
    }
668487
public function getLastSequenceNumber()
    {
        if (count($this->events) === 0) {
            return $this->lastCommittedSequenceNumber;
        }
        if ($this->lastSequenceNumber === null) {
            $event = end($this->events);
            $this->lastSequenceNumber = $event->getSequenceNumber();
        }
        return $this->lastSequenceNumber;
    }
1156834
public function getSum($Serie)
    {
        if (isset($this->Data["Series"][$Serie])) {
            return array_sum($this->Data["Series"][$Serie]["Data"]);
        }
        return null;
    }
1019465
public function getOrderPromotionTotal(): int
    {
        $orderPromotionTotal = 0;

        foreach ($this->items as $item) {
            $orderPromotionTotal += $item->getAdjustmentsTotalRecursively(AdjustmentInterface::ORDER_PROMOTION_ADJUSTMENT);
        }

        return $orderPromotionTotal;
    }
1047636
public function getStartDepth(): int
    {
        $startDepth = PHP_INT_MAX;

        foreach ($this->items as $item) {
            $startDepth = min($startDepth, $item->getZ());
        }

        return $startDepth;
    }
955284
public function colCount() {
		$count=$this->count();
		if ($this->hasOnlyCols($count))
			return $count;
		if ($count > 0)
			return $this->getItem(0)->count();
		return 0;
	}