Nextras\Orm\Mapper\Memory\ArrayMapper::createCollectionManyHasMany PHP Метод

createCollectionManyHasMany() публичный Метод

public createCollectionManyHasMany ( Nextras\Orm\Mapper\IMapper $mapperTwo, PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent )
$mapperTwo Nextras\Orm\Mapper\IMapper
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$parent Nextras\Orm\Entity\IEntity
    public function createCollectionManyHasMany(IMapper $mapperTwo, PropertyMetadata $metadata, IEntity $parent)
    {
        $targetMapper = $metadata->relationship->isMain ? $mapperTwo : $this;
        $collection = $targetMapper->findAll();
        $collection->setRelationshipMapping(new RelationshipMapperManyHasMany($metadata, $this), $parent);
        return $collection;
    }