src/Call/CallData.php
public function addIterableEvent(IterableEvent $iterableEvent): void
    {
        if (!$this->isIterable()) {
            throw new InvalidArgumentException('Not an iterable call.');
        }
        if ($this->endEvent) {
            throw new InvalidArgumentException('Call already completed.');
        }

        $iterableEvent->setCall($this);
        $this->iterableEvents[] = $iterableEvent;
    }
public function addIterableEvent(IterableEvent $iterableEvent): void
    {
        if (!$this->isIterable()) {
            throw new InvalidArgumentException('Not an iterable call.');
        }
        if ($this->endEvent) {
            throw new InvalidArgumentException('Call already completed.');
        }

        $iterableEvent->setCall($this);
        $this->iterableEvents[] = $iterableEvent;
    }
public function addIterableEvent ( IterableEvent $ iterableEvent ) : void { if ( ! $ this -> isIterable ( ) ) { throw new InvalidArgumentException ( 'Not an iterable call.' ) ; } if ( $ this -> endEvent ) { throw new InvalidArgumentException ( 'Call already completed.' ) ; } $ iterableEvent -> setCall ( $ this ) ; $ this -> iterableEvents [ ] = $ iterableEvent ; }
Add an iterable event.

@param IterableEvent $iterableEvent The iterable event.

@throws InvalidArgumentException If the call has already completed.
Add an iterable event .