@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | * @param array $args Associative list of route parameters |
33 | 33 | * @return ResponseInterface $response Modified response object with generated output |
34 | 34 | */ |
35 | - public static function deleteAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args ) |
|
35 | + public static function deleteAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
36 | 36 | { |
37 | - return self::createClient( $container, $request, $response, $args )->delete( $request, $response ); |
|
37 | + return self::createClient($container, $request, $response, $args)->delete($request, $response); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | * @param array $args Associative list of route parameters |
48 | 48 | * @return ResponseInterface $response Modified response object with generated output |
49 | 49 | */ |
50 | - public static function getAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args ) |
|
50 | + public static function getAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
51 | 51 | { |
52 | - return self::createClient( $container, $request, $response, $args )->get( $request, $response ); |
|
52 | + return self::createClient($container, $request, $response, $args)->get($request, $response); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | |
@@ -62,9 +62,9 @@ discard block |
||
62 | 62 | * @param array $args Associative list of route parameters |
63 | 63 | * @return ResponseInterface $response Modified response object with generated output |
64 | 64 | */ |
65 | - public static function patchAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args ) |
|
65 | + public static function patchAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
66 | 66 | { |
67 | - return self::createClient( $container, $request, $response, $args )->patch( $request, $response ); |
|
67 | + return self::createClient($container, $request, $response, $args)->patch($request, $response); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | * @param array $args Associative list of route parameters |
78 | 78 | * @return ResponseInterface $response Modified response object with generated output |
79 | 79 | */ |
80 | - public static function postAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args ) |
|
80 | + public static function postAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
81 | 81 | { |
82 | - return self::createClient( $container, $request, $response, $args )->post( $request, $response ); |
|
82 | + return self::createClient($container, $request, $response, $args)->post($request, $response); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | * @param array $args Associative list of route parameters |
93 | 93 | * @return ResponseInterface $response Modified response object with generated output |
94 | 94 | */ |
95 | - public static function putAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args ) |
|
95 | + public static function putAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
96 | 96 | { |
97 | - return self::createClient( $container, $request, $response, $args )->put( $request, $response ); |
|
97 | + return self::createClient($container, $request, $response, $args)->put($request, $response); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | |
@@ -107,9 +107,9 @@ discard block |
||
107 | 107 | * @param array $args Associative list of route parameters |
108 | 108 | * @return ResponseInterface $response Modified response object with generated output |
109 | 109 | */ |
110 | - public static function optionsAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args ) |
|
110 | + public static function optionsAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
111 | 111 | { |
112 | - return self::createClient( $container, $request, $response, $args )->options( $request, $response ); |
|
112 | + return self::createClient($container, $request, $response, $args)->options($request, $response); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | |
@@ -122,19 +122,19 @@ discard block |
||
122 | 122 | * @param array $args Associative list of route parameters |
123 | 123 | * @return \Aimeos\Client\JsonApi\Iface JSON client controller |
124 | 124 | */ |
125 | - protected static function createClient( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args ) |
|
125 | + protected static function createClient(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
126 | 126 | { |
127 | 127 | $params = $request->getQueryParams(); |
128 | - $resource = ( isset( $args['resource'] ) ? $args['resource'] : ( isset( $params['resource'] ) ? $params['resource'] : null ) ); |
|
129 | - $related = ( isset( $args['related'] ) ? $args['related'] : ( isset( $params['related'] ) ? $params['related'] : null ) ); |
|
130 | - $tmplPaths = $container->get( 'aimeos' )->getCustomPaths( 'client/jsonapi/templates' ); |
|
128 | + $resource = (isset($args['resource']) ? $args['resource'] : (isset($params['resource']) ? $params['resource'] : null)); |
|
129 | + $related = (isset($args['related']) ? $args['related'] : (isset($params['related']) ? $params['related'] : null)); |
|
130 | + $tmplPaths = $container->get('aimeos')->getCustomPaths('client/jsonapi/templates'); |
|
131 | 131 | |
132 | - $context = $container->get( 'aimeos_context' )->get( true, $args ); |
|
132 | + $context = $container->get('aimeos_context')->get(true, $args); |
|
133 | 133 | $langid = $context->getLocale()->getLanguageId(); |
134 | 134 | |
135 | - $view = $container->get( 'aimeos_view' )->create( $context, $request, $response, $args, $tmplPaths, $langid ); |
|
136 | - $context->setView( $view ); |
|
135 | + $view = $container->get('aimeos_view')->create($context, $request, $response, $args, $tmplPaths, $langid); |
|
136 | + $context->setView($view); |
|
137 | 137 | |
138 | - return \Aimeos\Client\JsonApi\Factory::createClient( $context, $resource . '/' . $related ); |
|
138 | + return \Aimeos\Client\JsonApi\Factory::createClient($context, $resource.'/'.$related); |
|
139 | 139 | } |
140 | 140 | } |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | * @param array $args Associative list of route parameters |
32 | 32 | * @return ResponseInterface $response Modified response object with generated output |
33 | 33 | */ |
34 | - public static function indexAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args ) |
|
34 | + public static function indexAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
35 | 35 | { |
36 | - $contents = $container->get( 'aimeos_page' )->getSections( 'account-index', $request, $response, $args ); |
|
37 | - return $container->get( 'view' )->render( $response, 'Account/index.html.twig', $contents ); |
|
36 | + $contents = $container->get('aimeos_page')->getSections('account-index', $request, $response, $args); |
|
37 | + return $container->get('view')->render($response, 'Account/index.html.twig', $contents); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
@@ -47,16 +47,16 @@ discard block |
||
47 | 47 | * @param array $args Associative list of route parameters |
48 | 48 | * @return ResponseInterface $response Modified response object with generated output |
49 | 49 | */ |
50 | - public static function downloadAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args ) |
|
50 | + public static function downloadAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
51 | 51 | { |
52 | - $context = $container->get( 'aimeos_context' )->get( true, $args ); |
|
52 | + $context = $container->get('aimeos_context')->get(true, $args); |
|
53 | 53 | $langid = $context->getLocale()->getLanguageId(); |
54 | 54 | |
55 | - $view = $container->get( 'aimeos_view' )->create( $context, $request, $response, $args, array(), $langid ); |
|
56 | - $context->setView( $view ); |
|
55 | + $view = $container->get('aimeos_view')->create($context, $request, $response, $args, array(), $langid); |
|
56 | + $context->setView($view); |
|
57 | 57 | |
58 | - $client = \Aimeos\Client\Html\Factory::createClient( $context, 'account/download' ); |
|
59 | - $client->setView( $view ); |
|
58 | + $client = \Aimeos\Client\Html\Factory::createClient($context, 'account/download'); |
|
59 | + $client->setView($view); |
|
60 | 60 | $client->process(); |
61 | 61 | |
62 | 62 | return $view->response(); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @param ContainerInterface $container Dependency container |
32 | 32 | */ |
33 | - public function __construct( ContainerInterface $container ) |
|
33 | + public function __construct(ContainerInterface $container) |
|
34 | 34 | { |
35 | 35 | $this->container = $container; |
36 | 36 | } |
@@ -45,24 +45,24 @@ discard block |
||
45 | 45 | * @param array Associative list of URI attributes |
46 | 46 | * @return array Associative list with body and header output separated by client name |
47 | 47 | */ |
48 | - public function getSections( $pageName, ServerRequestInterface $request, ResponseInterface $response, array $attr ) |
|
48 | + public function getSections($pageName, ServerRequestInterface $request, ResponseInterface $response, array $attr) |
|
49 | 49 | { |
50 | - $tmplPaths = $this->container->get( 'aimeos' )->getCustomPaths( 'client/html/templates' ); |
|
51 | - $context = $this->container->get( 'aimeos_context' )->get( true, $attr ); |
|
50 | + $tmplPaths = $this->container->get('aimeos')->getCustomPaths('client/html/templates'); |
|
51 | + $context = $this->container->get('aimeos_context')->get(true, $attr); |
|
52 | 52 | $langid = $context->getLocale()->getLanguageId(); |
53 | 53 | |
54 | - $view = $this->container->get( 'aimeos_view' )->create( $context, $request, $response, $attr, $tmplPaths, $langid ); |
|
55 | - $context->setView( $view ); |
|
54 | + $view = $this->container->get('aimeos_view')->create($context, $request, $response, $attr, $tmplPaths, $langid); |
|
55 | + $context->setView($view); |
|
56 | 56 | |
57 | - $pagesConfig = $this->container->get( 'aimeos_config' )->get()->get( 'page', array() ); |
|
58 | - $result = array( 'aibody' => array(), 'aiheader' => array() ); |
|
57 | + $pagesConfig = $this->container->get('aimeos_config')->get()->get('page', array()); |
|
58 | + $result = array('aibody' => array(), 'aiheader' => array()); |
|
59 | 59 | |
60 | - if( isset( $pagesConfig[$pageName] ) ) |
|
60 | + if (isset($pagesConfig[$pageName])) |
|
61 | 61 | { |
62 | - foreach( (array) $pagesConfig[$pageName] as $clientName ) |
|
62 | + foreach ((array) $pagesConfig[$pageName] as $clientName) |
|
63 | 63 | { |
64 | - $client = \Aimeos\Client\Html\Factory::createClient( $context, $clientName ); |
|
65 | - $client->setView( clone $view ); |
|
64 | + $client = \Aimeos\Client\Html\Factory::createClient($context, $clientName); |
|
65 | + $client->setView(clone $view); |
|
66 | 66 | $client->process(); |
67 | 67 | |
68 | 68 | $result['aibody'][$clientName] = $client->getBody(); |