public function load(callable $readModelDefinition)
    {
        $readModelDefinition($this->definition);

        call_user_func($this->callback, $this->propertyName, function (IRelation $relation) {
            return new RelationReadModelReference(new ReadModelMapper($this->definition));
        });
    }
public function load(callable $readModelDefinition)
    {
        $readModelDefinition($this->definition);

        call_user_func($this->callback, $this->propertyName, function (IRelation $relation) {
            return new RelationReadModelReference(new ReadModelMapper($this->definition));
        });
    }
public function load ( callable $ readModelDefinition ) { $ readModelDefinition ( $ this -> definition ) ; call_user_func ( $ this -> callback , $ this -> propertyName , function ( IRelation $ relation ) { return new RelationReadModelReference ( new ReadModelMapper ( $ this -> definition ) ) ; } ) ; }
Defines to load the relation using the supplied read model definition.

@param callable $readModelDefinition

@return void
Defines to load the relation using the supplied read model definition .