コード例 #1
0
 /**
  * @param Request $request
  *
  * @return Response
  */
 public function deleteAction(Request $request)
 {
     $this->mapper->delete($this->mapper->getResource($request->get('id')));
     return new Response('', 204);
 }
コード例 #2
0
ファイル: Mapper.php プロジェクト: bricks81/BricksMapper
 /**
  * @param MapperInterface $mapper
  */
 public function rollback(MapperInterface $mapper)
 {
     $writeAdapter = $mapper->getWriteAdapter();
     $writeAdapter->rollback();
 }
コード例 #3
0
ファイル: MapperProvider.php プロジェクト: retentio/boomgo
 /**
  * Unserialize an embedded collection
  *
  * Return a collection of serialized objects (arrays)
  *
  * @param MapperInterface $mapper
  * @param array           $data
  *
  * @return array
  */
 protected function unserializeEmbeddedCollection(MapperInterface $mapper, array $data)
 {
     $collection = array();
     foreach ($data as $document) {
         $collection[] = $mapper->unserialize($document);
     }
     return $collection;
 }
コード例 #4
0
 public function testSendReturnsFluentInterfaceOnSuccess()
 {
     $this->transport->expects($this->once())->method('write')->will($this->returnSelf());
     $this->mapper->expects($this->once())->method('mapOut')->will($this->returnValue('{"bar":1}'));
     $this->assertInstanceOf('Chippyash\\SDO\\AbstractSDO', $this->sut->send());
 }