Eloquent\Phony\Call\CallData::eventAt PHP Метод

eventAt() публичный Метод

Negative indices are offset from the end of the list. That is, -1 indicates the last element, and -2 indicates the second last element.
public eventAt ( integer $index ) : Eloquent\Phony\Event\Event
$index integer The index.
Результат Eloquent\Phony\Event\Event The event.
    public function eventAt($index = 0)
    {
        if (0 === $index) {
            return $this->calledEvent;
        }
        $events = $this->allEvents();
        $count = count($events);
        if (!$this->normalizeIndex($count, $index, $normalized)) {
            throw new UndefinedEventException($index);
        }
        return $events[$normalized];
    }