@@ 59-76 (lines=18) @@ | ||
56 | /** |
|
57 | * {@inheritdoc} |
|
58 | */ |
|
59 | public function getWorkspace($workspaceId) |
|
60 | { |
|
61 | $request = new WorkspaceRequest( |
|
62 | array( |
|
63 | 'workspaceId' => $this->validate($workspaceId), |
|
64 | ) |
|
65 | ); |
|
66 | ||
67 | $response = $this->delegate($request); |
|
68 | ||
69 | $workspace = $this->hydrator->hydrate($response->body['data'], new Workspace()); |
|
70 | ||
71 | return new WorkspaceResponse( |
|
72 | array( |
|
73 | 'workspace' => $workspace, |
|
74 | ) |
|
75 | ); |
|
76 | } |
|
77 | ||
78 | /** |
|
79 | * {@inheritdoc} |
|
@@ 210-228 (lines=19) @@ | ||
207 | /** |
|
208 | * {@inheritdoc} |
|
209 | */ |
|
210 | public function updateWorkspace($workspaceId, Workspace $workspace) |
|
211 | { |
|
212 | $request = new UpdateWorkspace( |
|
213 | array( |
|
214 | 'workspaceId' => $this->validate($workspaceId), |
|
215 | 'data' => $this->extractDataFromObject($workspace), |
|
216 | ) |
|
217 | ); |
|
218 | ||
219 | $response = $this->delegate($request); |
|
220 | ||
221 | $workspace = $this->hydrator->hydrate($response->body['data'], new Workspace()); |
|
222 | ||
223 | return new WorkspaceResponse( |
|
224 | array( |
|
225 | 'workspace' => $workspace, |
|
226 | ) |
|
227 | ); |
|
228 | } |
|
229 | } |
|
230 |