src/Infrastructure/DataAccess/UnitOfWork/UnitOfWork.php
public function checkout($aggregate_root_id)
    {
        $aggregate_root = $this->create();
        $event_stream = $this->event_reader->read($aggregate_root_id);

        if ($event_stream) {
            $aggregate_root->reconstituteFrom($event_stream->getEvents());
        } else {
            $this->logger->debug(__METHOD__ . ' - ' . get_class($this->event_reader));
            throw new RuntimeError(
                sprintf('Unable to load event stream for given AR identifier: %s', $aggregate_root_id)
            );
        }
        return $aggregate_root;
    }
public function checkout($aggregate_root_id)
    {
        $aggregate_root = $this->create();
        $event_stream = $this->event_reader->read($aggregate_root_id);

        if ($event_stream) {
            $aggregate_root->reconstituteFrom($event_stream->getEvents());
        } else {
            $this->logger->debug(__METHOD__ . ' - ' . get_class($this->event_reader));
            throw new RuntimeError(
                sprintf('Unable to load event stream for given AR identifier: %s', $aggregate_root_id)
            );
        }
        return $aggregate_root;
    }
public function checkout ( $ aggregate_root_id ) { $ aggregate_root = $ this -> create ( ) ; $ event_stream = $ this -> event_reader -> read ( $ aggregate_root_id ) ; if ( $ event_stream ) { $ aggregate_root -> reconstituteFrom ( $ event_stream -> getEvents ( ) ) ; } else { $ this -> logger -> debug ( __METHOD__ . ' - ' . get_class ( $ this -> event_reader ) ) ; throw new RuntimeError ( sprintf ( 'Unable to load event stream for given AR identifier: %s' , $ aggregate_root_id ) ) ; } return $ aggregate_root ; }
Checkout the aggregate-root for a given identifier.

@param string $aggregate_root_id

@return AggregateRootInterface
Checkout the aggregate - root for a given identifier .