@@ -150,7 +150,7 @@ |
||
| 150 | 150 | * Sets the view object that will generate the admin output. |
| 151 | 151 | * |
| 152 | 152 | * @param \Aimeos\MW\View\Iface $view The view object which generates the admin output |
| 153 | - * @return \Aimeos\Admin\JQAdm\Iface Reference to this object for fluent calls |
|
| 153 | + * @return Base Reference to this object for fluent calls |
|
| 154 | 154 | */ |
| 155 | 155 | public function setView( \Aimeos\MW\View\Iface $view ) |
| 156 | 156 | { |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | /** |
| 41 | 41 | * Adds the decorators to the JSON API client object |
| 42 | 42 | * |
| 43 | - * @param \Aimeos\Client\JsonApi\Common\Iface $client Client object |
|
| 43 | + * @param \Aimeos\Client\JsonApi\Iface $client Client object |
|
| 44 | 44 | * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects |
| 45 | 45 | * @param string $path Name of the client, e.g "product" |
| 46 | 46 | * @return \Aimeos\Client\JsonApi\Iface Client object |
@@ -99,8 +99,7 @@ |
||
| 99 | 99 | $decorators = $config->get( 'client/jsonapi/' . $dpath . 'decorators/local', [] ); |
| 100 | 100 | $client = self::addDecorators( $client, $decorators, $classprefix, $context, $path ); |
| 101 | 101 | } |
| 102 | - } |
|
| 103 | - else |
|
| 102 | + } else |
|
| 104 | 103 | { |
| 105 | 104 | $classprefix = '\\Aimeos\\Client\\JsonApi\\Common\\Decorator\\'; |
| 106 | 105 | $client = self::addDecorators( $client, $decorators, $classprefix, $context, $path ); |
@@ -123,6 +123,9 @@ |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
| 126 | + /** |
|
| 127 | + * @param string $name |
|
| 128 | + */ |
|
| 126 | 129 | protected function access( $name ) |
| 127 | 130 | { |
| 128 | 131 | $class = new \ReflectionClass( '\Aimeos\Client\JsonApi\Common\Factory\Base' ); |
@@ -131,8 +131,7 @@ |
||
| 131 | 131 | if( ( $client = @call_user_func_array( array( $factory, 'createClient' ), $args ) ) === false ) { |
| 132 | 132 | throw new \Aimeos\Client\JsonApi\Exception( sprintf( 'Invalid factory "%1$s"', $factory ), 400 ); |
| 133 | 133 | } |
| 134 | - } |
|
| 135 | - else |
|
| 134 | + } else |
|
| 136 | 135 | { |
| 137 | 136 | $client = self::createClientRoot( $context, $path, $name ); |
| 138 | 137 | } |
@@ -150,7 +150,7 @@ |
||
| 150 | 150 | * Sets the view object that will generate the admin output. |
| 151 | 151 | * |
| 152 | 152 | * @param \Aimeos\MW\View\Iface $view The view object which generates the admin output |
| 153 | - * @return \Aimeos\Admin\JQAdm\Iface Reference to this object for fluent calls |
|
| 153 | + * @return Base Reference to this object for fluent calls |
|
| 154 | 154 | */ |
| 155 | 155 | public function setView( \Aimeos\MW\View\Iface $view ) |
| 156 | 156 | { |
@@ -43,18 +43,15 @@ discard block |
||
| 43 | 43 | $view->total = 1; |
| 44 | 44 | |
| 45 | 45 | $status = 200; |
| 46 | - } |
|
| 47 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 46 | + } catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 48 | 47 | { |
| 49 | 48 | $status = 403; |
| 50 | 49 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 51 | - } |
|
| 52 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 50 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 53 | 51 | { |
| 54 | 52 | $status = 404; |
| 55 | 53 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 56 | - } |
|
| 57 | - catch( \Exception $e ) |
|
| 54 | + } catch( \Exception $e ) |
|
| 58 | 55 | { |
| 59 | 56 | $status = 500; |
| 60 | 57 | $view->errors = $this->getErrorDetails( $e ); |
@@ -83,8 +80,7 @@ discard block |
||
| 83 | 80 | { |
| 84 | 81 | $view->items = $cntl->getItem( $id ); |
| 85 | 82 | $view->total = 1; |
| 86 | - } |
|
| 87 | - else |
|
| 83 | + } else |
|
| 88 | 84 | { |
| 89 | 85 | $total = 0; |
| 90 | 86 | $filter = $cntl->createFilter(); |
@@ -95,18 +91,15 @@ discard block |
||
| 95 | 91 | } |
| 96 | 92 | |
| 97 | 93 | $status = 200; |
| 98 | - } |
|
| 99 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 94 | + } catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 100 | 95 | { |
| 101 | 96 | $status = 403; |
| 102 | 97 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 103 | - } |
|
| 104 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 98 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 105 | 99 | { |
| 106 | 100 | $status = 404; |
| 107 | 101 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 108 | - } |
|
| 109 | - catch( \Exception $e ) |
|
| 102 | + } catch( \Exception $e ) |
|
| 110 | 103 | { |
| 111 | 104 | $status = 500; |
| 112 | 105 | $view->errors = $this->getErrorDetails( $e ); |
@@ -101,8 +101,7 @@ |
||
| 101 | 101 | foreach( $items as $item ) { |
| 102 | 102 | $data[] = $entryFcn( $item ); |
| 103 | 103 | } |
| 104 | - } |
|
| 105 | - else |
|
| 104 | + } else |
|
| 106 | 105 | { |
| 107 | 106 | $data = $entryFcn( $items ); |
| 108 | 107 | } |