private function doSet($offset, $value, $arrayAccess)
    {
        $arrayAccess ? $this->coll->offsetSet($offset, $value) : $this->coll->set($offset, $value);

        // Handle orphanRemoval
        if ($this->uow !== null && $this->isOrphanRemovalEnabled() && $value !== null) {
            $this->uow->unscheduleOrphanRemoval($value);
        }

        $this->changed();
    }
private function doSet($offset, $value, $arrayAccess)
    {
        $arrayAccess ? $this->coll->offsetSet($offset, $value) : $this->coll->set($offset, $value);

        // Handle orphanRemoval
        if ($this->uow !== null && $this->isOrphanRemovalEnabled() && $value !== null) {
            $this->uow->unscheduleOrphanRemoval($value);
        }

        $this->changed();
    }
private function doSet ( $ offset , $ value , $ arrayAccess ) { $ arrayAccess ? $ this -> coll -> offsetSet ( $ offset , $ value ) : $ this -> coll -> set ( $ offset , $ value ) ; // Handle orphanRemoval if ( $ this -> uow !== null && $ this -> isOrphanRemovalEnabled ( ) && $ value !== null ) { $ this -> uow -> unscheduleOrphanRemoval ( $ value ) ; } $ this -> changed ( ) ; }
Actual logic for setting an element in the collection.

@param mixed $offset
@param mixed $value
@param bool  $arrayAccess
Actual logic for setting an element in the collection .