GraphAware\Neo4j\OGM\Lazy\LazyRelationshipCollection::__construct PHP Method

__construct() public method

public __construct ( EntityManager $em, $baseEntity, $targetEntityClass, RelationshipMetadata $relationshipMetadata, $initialEntity = null )
$em GraphAware\Neo4j\OGM\EntityManager
$relationshipMetadata GraphAware\Neo4j\OGM\Metadata\RelationshipMetadata
    public function __construct(EntityManager $em, $baseEntity, $targetEntityClass, RelationshipMetadata $relationshipMetadata, $initialEntity = null)
    {
        $this->finder = $relationshipMetadata->isRelationshipEntity() ? new RelationshipEntityFinder($em, $targetEntityClass, $relationshipMetadata, $baseEntity) : new RelationshipsFinder($em, $targetEntityClass, $relationshipMetadata);
        $this->em = $em;
        $this->collection = new Collection();
        $this->baseId = $this->em->getClassMetadataFor(get_class($baseEntity))->getIdValue($baseEntity);
        $this->initialEntity = $initialEntity;
        $this->baseEntityClass = get_class($baseEntity);
        $this->relationshipMetadata = $relationshipMetadata;
        $this->baseInstance = $baseEntity;
    }
LazyRelationshipCollection