src/Infrastructure/DataAccess/UnitOfWork/UnitOfWork.php
protected function startTracking(AggregateRootInterface $aggregate_root)
    {
        if ($this->tracked_aggregate_roots->contains($aggregate_root)) {
            throw new RuntimeError("Trying to checkout aggregate that already has a session open.");
        }

        $aggregate_root_id = $aggregate_root->getIdentifier();
        $this->tracked_aggregate_roots[$aggregate_root] = new EventStream([ 'identifier' => $aggregate_root_id ]);
    }
protected function startTracking(AggregateRootInterface $aggregate_root)
    {
        if ($this->tracked_aggregate_roots->contains($aggregate_root)) {
            throw new RuntimeError("Trying to checkout aggregate that already has a session open.");
        }

        $aggregate_root_id = $aggregate_root->getIdentifier();
        $this->tracked_aggregate_roots[$aggregate_root] = new EventStream([ 'identifier' => $aggregate_root_id ]);
    }
protected function startTracking ( AggregateRootInterface $ aggregate_root ) { if ( $ this -> tracked_aggregate_roots -> contains ( $ aggregate_root ) ) { throw new RuntimeError ( "Trying to checkout aggregate that already has a session open." ) ; } $ aggregate_root_id = $ aggregate_root -> getIdentifier ( ) ; $ this -> tracked_aggregate_roots [ $ aggregate_root ] = new EventStream ( [ 'identifier' => $ aggregate_root_id ] ) ; }
Register the given aggregate-root to our event stream map.

@param AggregateRootInterface $aggregate_root
Register the given aggregate - root to our event stream map .