private function &getCollection()
    {
        if (null === $this->collection) {
            $qb = $this->createAndFilterQueryBuilder($this->getEntityAlias());
            if ($this->isHydrationDisabled()) {
                $this->collection = $qb->getQuery()->getScalarResult();
            } else {
                $this->collection = $qb->getQuery()->getResult();
            }
        }
        return $this->collection;
    }
private function &getCollection()
    {
        if (null === $this->collection) {
            $qb = $this->createAndFilterQueryBuilder($this->getEntityAlias());
            if ($this->isHydrationDisabled()) {
                $this->collection = $qb->getQuery()->getScalarResult();
            } else {
                $this->collection = $qb->getQuery()->getResult();
            }
        }
        return $this->collection;
    }
private function & getCollection ( ) { if ( null === $ this -> collection ) { $ qb = $ this -> createAndFilterQueryBuilder ( $ this -> getEntityAlias ( ) ) ; if ( $ this -> isHydrationDisabled ( ) ) { $ this -> collection = $ qb -> getQuery ( ) -> getScalarResult ( ) ; } else { $ this -> collection = $ qb -> getQuery ( ) -> getResult ( ) ; } } return $ this -> collection ; }
Load data if not already and return it. Important to call by reference
to avoid array copies

@return array
Load data if not already and return it . Important to call by reference to avoid array copies