@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | * @param string Related resource location, e.g. "address" |
32 | 32 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
33 | 33 | */ |
34 | - public function deleteAction( ServerRequestInterface $request, $resource, $related = '' ) |
|
34 | + public function deleteAction(ServerRequestInterface $request, $resource, $related = '') |
|
35 | 35 | { |
36 | - return $this->createClient( $resource, $related )->delete( $request, new Response() ); |
|
36 | + return $this->createClient($resource, $related)->delete($request, new Response()); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | * @param string Related resource location, e.g. "address" |
46 | 46 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
47 | 47 | */ |
48 | - public function getAction( ServerRequestInterface $request, $resource, $related = '' ) |
|
48 | + public function getAction(ServerRequestInterface $request, $resource, $related = '') |
|
49 | 49 | { |
50 | - return $this->createClient( $resource, $related )->get( $request, new Response() ); |
|
50 | + return $this->createClient($resource, $related)->get($request, new Response()); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | * @param string Related resource location, e.g. "address" |
60 | 60 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
61 | 61 | */ |
62 | - public function patchAction( ServerRequestInterface $request, $resource, $related = '' ) |
|
62 | + public function patchAction(ServerRequestInterface $request, $resource, $related = '') |
|
63 | 63 | { |
64 | - return $this->createClient( $resource, $related )->patch( $request, new Response() ); |
|
64 | + return $this->createClient($resource, $related)->patch($request, new Response()); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | |
@@ -73,9 +73,9 @@ discard block |
||
73 | 73 | * @param string Related resource location, e.g. "address" |
74 | 74 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
75 | 75 | */ |
76 | - public function postAction( ServerRequestInterface $request, $resource, $related = '' ) |
|
76 | + public function postAction(ServerRequestInterface $request, $resource, $related = '') |
|
77 | 77 | { |
78 | - return $this->createClient( $resource, $related )->post( $request, new Response() ); |
|
78 | + return $this->createClient($resource, $related)->post($request, new Response()); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | * @param string Related resource location, e.g. "address" |
88 | 88 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
89 | 89 | */ |
90 | - public function putAction( ServerRequestInterface $request, $resource, $related = '' ) |
|
90 | + public function putAction(ServerRequestInterface $request, $resource, $related = '') |
|
91 | 91 | { |
92 | - return $this->createClient( $resource, $related )->put( $request, new Response() ); |
|
92 | + return $this->createClient($resource, $related)->put($request, new Response()); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | |
@@ -100,9 +100,9 @@ discard block |
||
100 | 100 | * @param string Resource location, e.g. "customer" |
101 | 101 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
102 | 102 | */ |
103 | - public function optionsAction( ServerRequestInterface $request, $resource = '' ) |
|
103 | + public function optionsAction(ServerRequestInterface $request, $resource = '') |
|
104 | 104 | { |
105 | - return $this->createClient( $resource )->options( $request, new Response() ); |
|
105 | + return $this->createClient($resource)->options($request, new Response()); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | |
@@ -113,15 +113,15 @@ discard block |
||
113 | 113 | * @param string Related resource location, e.g. "address" |
114 | 114 | * @return \Aimeos\Client\JsonApi\Iface JSON API client |
115 | 115 | */ |
116 | - protected function createClient( $resource, $related = '' ) |
|
116 | + protected function createClient($resource, $related = '') |
|
117 | 117 | { |
118 | - $tmplPaths = $this->container->get( 'aimeos' )->get()->getCustomPaths( 'client/jsonapi/templates' ); |
|
119 | - $context = $this->container->get( 'aimeos_context' )->get(); |
|
118 | + $tmplPaths = $this->container->get('aimeos')->get()->getCustomPaths('client/jsonapi/templates'); |
|
119 | + $context = $this->container->get('aimeos_context')->get(); |
|
120 | 120 | $langid = $context->getLocale()->getLanguageId(); |
121 | 121 | |
122 | - $view = $this->container->get( 'aimeos_view' )->create( $context, $tmplPaths, $langid ); |
|
123 | - $context->setView( $view ); |
|
122 | + $view = $this->container->get('aimeos_view')->create($context, $tmplPaths, $langid); |
|
123 | + $context->setView($view); |
|
124 | 124 | |
125 | - return \Aimeos\Client\JsonApi\Factory::createClient( $context, $tmplPaths, $resource . '/' . $related ); |
|
125 | + return \Aimeos\Client\JsonApi\Factory::createClient($context, $tmplPaths, $resource.'/'.$related); |
|
126 | 126 | } |
127 | 127 | } |