src/EntityCollection.php
public function addEntity($entity)
    {
        $this->collection[] = $entity;
        $this->setCount(count($this->collection));

        return $this;
    }
public function addEntity($entity)
    {
        $this->collection[] = $entity;
        $this->setCount(count($this->collection));

        return $this;
    }
public function addEntity ( $ entity ) { $ this -> collection [ ] = $ entity ; $ this -> setCount ( count ( $ this -> collection ) ) ; return $ this ; }
Adds a single entity.

@param array $entity

@return EntityCollection
Adds a single entity .