/**
  * @return RepositoryInterface
  */
 public function create()
 {
     $director = new MappingDirector();
     $mappingChain = $director->create(new DynamoDbMappingBuilder());
     $transform = new RootDecorator(new Transformer($mappingChain));
     $client = new DynamoDbClient(['endpoint' => 'http://localhost:8000', 'version' => "2012-08-10", 'profile' => 'default', 'region' => 'us-west-2']);
     return new Repository($client, $transform, 'Music');
 }
Пример #2
0
 protected function setUp()
 {
     $director = new MappingDirector();
     $this->service = new Transformer($director->create(new Neutral()));
 }
Пример #3
0
 protected function setUp()
 {
     $director = new MappingDirector();
     $mappingChain = $director->create(new Neutral());
     $this->transform = new Transformer($mappingChain);
 }
Пример #4
0
 protected function setUp()
 {
     $director = new MappingDirector();
     $bluePrint = $this->createBuilder();
     $this->mediator = $director->create($bluePrint);
 }
 public function prepare()
 {
     $director = new MappingDirector();
     $mappingChain = $director->create(new Neutral());
     $this->mapper = new Transformer($mappingChain);
 }