src/Synapse/Entity/EntityIterator.php
public function setEntities(array $entities)
    {
        foreach ($entities as $entity) {
            if (! $entity instanceof AbstractEntity) {
                $message = sprintf(
                    'Expected an array of entities. Array contains element of type %s.',
                    gettype($entity)
                );

                throw new InvalidArgumentException($message);
            }
        }

        $this->entities = $entities;
    }
public function setEntities(array $entities)
    {
        foreach ($entities as $entity) {
            if (! $entity instanceof AbstractEntity) {
                $message = sprintf(
                    'Expected an array of entities. Array contains element of type %s.',
                    gettype($entity)
                );

                throw new InvalidArgumentException($message);
            }
        }

        $this->entities = $entities;
    }
public function setEntities ( array $ entities ) { foreach ( $ entities as $ entity ) { if ( ! $ entity instanceof AbstractEntity ) { $ message = sprintf ( 'Expected an array of entities. Array contains element of type %s.' , gettype ( $ entity ) ) ; throw new InvalidArgumentException ( $ message ) ; } } $ this -> entities = $ entities ; }
Set the entities wrapped by this class

@param  array $entities Array of AbstractEntity objects

@throws InvalidArgumentException If all elements of $entities are not AbstractEntity objects
Set the entities wrapped by this class