@@ -152,7 +152,7 @@ |
||
| 152 | 152 | /** |
| 153 | 153 | * Returns the frontend controller |
| 154 | 154 | * |
| 155 | - * @return \Aimeos\Controller\Frontend\Order\Iface Frontend controller object |
|
| 155 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
| 156 | 156 | */ |
| 157 | 157 | protected function getController() |
| 158 | 158 | { |
@@ -30,13 +30,13 @@ discard block |
||
| 30 | 30 | * @param \Aimeos\Controller\Frontend\Iface $controller Controller object |
| 31 | 31 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
| 32 | 32 | */ |
| 33 | - public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context ) |
|
| 33 | + public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context) |
|
| 34 | 34 | { |
| 35 | 35 | $iface = '\Aimeos\Controller\Frontend\Order\Iface'; |
| 36 | - if( !( $controller instanceof $iface ) ) |
|
| 36 | + if (!($controller instanceof $iface)) |
|
| 37 | 37 | { |
| 38 | - $msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface ); |
|
| 39 | - throw new \Aimeos\Controller\Frontend\Exception( $msg ); |
|
| 38 | + $msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface); |
|
| 39 | + throw new \Aimeos\Controller\Frontend\Exception($msg); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $this->context = $context; |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | * @return mixed Returns the value of the called method |
| 53 | 53 | * @throws \Aimeos\Controller\Frontend\Exception If method call failed |
| 54 | 54 | */ |
| 55 | - public function __call( $name, array $param ) |
|
| 55 | + public function __call($name, array $param) |
|
| 56 | 56 | { |
| 57 | - return @call_user_func_array( array( $this->controller, $name ), $param ); |
|
| 57 | + return @call_user_func_array(array($this->controller, $name), $param); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | |
@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object to be stored |
| 69 | 69 | * @return \Aimeos\MShop\Order\Item\Iface Order item that belongs to the stored basket |
| 70 | 70 | */ |
| 71 | - public function store( \Aimeos\MShop\Order\Item\Base\Iface $basket ) |
|
| 71 | + public function store(\Aimeos\MShop\Order\Item\Base\Iface $basket) |
|
| 72 | 72 | { |
| 73 | - return $this->getController()->store( $basket ); |
|
| 73 | + return $this->getController()->store($basket); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
| 94 | 94 | * @return void |
| 95 | 95 | */ |
| 96 | - public function block( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
|
| 96 | + public function block(\Aimeos\MShop\Order\Item\Iface $orderItem) |
|
| 97 | 97 | { |
| 98 | - $this->getController()->block( $orderItem ); |
|
| 98 | + $this->getController()->block($orderItem); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | |
@@ -118,9 +118,9 @@ discard block |
||
| 118 | 118 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
| 119 | 119 | * @return void |
| 120 | 120 | */ |
| 121 | - public function unblock( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
|
| 121 | + public function unblock(\Aimeos\MShop\Order\Item\Iface $orderItem) |
|
| 122 | 122 | { |
| 123 | - $this->getController()->unblock( $orderItem ); |
|
| 123 | + $this->getController()->unblock($orderItem); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | |
@@ -139,9 +139,9 @@ discard block |
||
| 139 | 139 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
| 140 | 140 | * @return void |
| 141 | 141 | */ |
| 142 | - public function update( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
|
| 142 | + public function update(\Aimeos\MShop\Order\Item\Iface $orderItem) |
|
| 143 | 143 | { |
| 144 | - $this->getController()->update( $orderItem ); |
|
| 144 | + $this->getController()->update($orderItem); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | |
@@ -191,7 +191,7 @@ |
||
| 191 | 191 | /** |
| 192 | 192 | * Returns the frontend controller |
| 193 | 193 | * |
| 194 | - * @return \Aimeos\Controller\Frontend\Product\Iface Frontend controller object |
|
| 194 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
| 195 | 195 | */ |
| 196 | 196 | protected function getController() |
| 197 | 197 | { |
@@ -30,13 +30,13 @@ discard block |
||
| 30 | 30 | * @param \Aimeos\Controller\Frontend\Iface $controller Controller object |
| 31 | 31 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
| 32 | 32 | */ |
| 33 | - public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context ) |
|
| 33 | + public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context) |
|
| 34 | 34 | { |
| 35 | 35 | $iface = '\Aimeos\Controller\Frontend\Product\Iface'; |
| 36 | - if( !( $controller instanceof $iface ) ) |
|
| 36 | + if (!($controller instanceof $iface)) |
|
| 37 | 37 | { |
| 38 | - $msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface ); |
|
| 39 | - throw new \Aimeos\Controller\Frontend\Exception( $msg ); |
|
| 38 | + $msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface); |
|
| 39 | + throw new \Aimeos\Controller\Frontend\Exception($msg); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $this->context = $context; |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | * @return mixed Returns the value of the called method |
| 53 | 53 | * @throws \Aimeos\Controller\Frontend\Exception If method call failed |
| 54 | 54 | */ |
| 55 | - public function __call( $name, array $param ) |
|
| 55 | + public function __call($name, array $param) |
|
| 56 | 56 | { |
| 57 | - return @call_user_func_array( array( $this->controller, $name ), $param ); |
|
| 57 | + return @call_user_func_array(array($this->controller, $name), $param); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | |
@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
| 69 | 69 | * @since 2017.03 |
| 70 | 70 | */ |
| 71 | - public function addFilterAttribute( \Aimeos\MW\Criteria\Iface $filter, array $attrIds, array $optIds, array $oneIds ) |
|
| 71 | + public function addFilterAttribute(\Aimeos\MW\Criteria\Iface $filter, array $attrIds, array $optIds, array $oneIds) |
|
| 72 | 72 | { |
| 73 | - return $this->controller->addFilterAttribute( $filter, $attrIds, $optIds, $oneIds ); |
|
| 73 | + return $this->controller->addFilterAttribute($filter, $attrIds, $optIds, $oneIds); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | |
@@ -86,10 +86,10 @@ discard block |
||
| 86 | 86 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
| 87 | 87 | * @since 2017.03 |
| 88 | 88 | */ |
| 89 | - public function addFilterCategory( \Aimeos\MW\Criteria\Iface $filter, $catId, |
|
| 90 | - $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE, $sort = null, $direction = '+', $listtype = 'default' ) |
|
| 89 | + public function addFilterCategory(\Aimeos\MW\Criteria\Iface $filter, $catId, |
|
| 90 | + $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE, $sort = null, $direction = '+', $listtype = 'default') |
|
| 91 | 91 | { |
| 92 | - return $this->controller->addFilterCategory( $filter, $catId, $level, $sort, $direction, $listtype ); |
|
| 92 | + return $this->controller->addFilterCategory($filter, $catId, $level, $sort, $direction, $listtype); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | |
@@ -104,9 +104,9 @@ discard block |
||
| 104 | 104 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
| 105 | 105 | * @since 2017.03 |
| 106 | 106 | */ |
| 107 | - public function addFilterText( \Aimeos\MW\Criteria\Iface $filter, $input, $sort = null, $direction = '+', $listtype = 'default' ) |
|
| 107 | + public function addFilterText(\Aimeos\MW\Criteria\Iface $filter, $input, $sort = null, $direction = '+', $listtype = 'default') |
|
| 108 | 108 | { |
| 109 | - return $this->controller->addFilterText( $filter, $input, $sort, $direction, $listtype ); |
|
| 109 | + return $this->controller->addFilterText($filter, $input, $sort, $direction, $listtype); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | |
@@ -118,9 +118,9 @@ discard block |
||
| 118 | 118 | * @return array Associative list of key values as key and the product count for this key as value |
| 119 | 119 | * @since 2015.08 |
| 120 | 120 | */ |
| 121 | - public function aggregate( \Aimeos\MW\Criteria\Iface $filter, $key ) |
|
| 121 | + public function aggregate(\Aimeos\MW\Criteria\Iface $filter, $key) |
|
| 122 | 122 | { |
| 123 | - return $this->controller->aggregate( $filter, $key ); |
|
| 123 | + return $this->controller->aggregate($filter, $key); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | |
@@ -135,9 +135,9 @@ discard block |
||
| 135 | 135 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
| 136 | 136 | * @since 2015.08 |
| 137 | 137 | */ |
| 138 | - public function createFilter( $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default' ) |
|
| 138 | + public function createFilter($sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default') |
|
| 139 | 139 | { |
| 140 | - return $this->controller->createFilter( $sort, $direction, $start, $size, $listtype ); |
|
| 140 | + return $this->controller->createFilter($sort, $direction, $start, $size, $listtype); |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | |
@@ -149,9 +149,9 @@ discard block |
||
| 149 | 149 | * @return \Aimeos\MShop\Product\Item\Iface Product item including the referenced domains items |
| 150 | 150 | * @since 2017.03 |
| 151 | 151 | */ |
| 152 | - public function getItem( $productId, array $domains = array( 'attribute', 'media', 'price', 'product', 'product/property', 'text' ) ) |
|
| 152 | + public function getItem($productId, array $domains = array('attribute', 'media', 'price', 'product', 'product/property', 'text')) |
|
| 153 | 153 | { |
| 154 | - return $this->controller->getItem( $productId, $domains ); |
|
| 154 | + return $this->controller->getItem($productId, $domains); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | |
@@ -163,9 +163,9 @@ discard block |
||
| 163 | 163 | * @return \Aimeos\MShop\Product\Item\Iface[] Associative list of product IDs as keys and product items as values |
| 164 | 164 | * @since 2017.03 |
| 165 | 165 | */ |
| 166 | - public function getItems( array $productIds, array $domains = array( 'media', 'price', 'text' ) ) |
|
| 166 | + public function getItems(array $productIds, array $domains = array('media', 'price', 'text')) |
|
| 167 | 167 | { |
| 168 | - return $this->controller->getItems( $productIds, $domains ); |
|
| 168 | + return $this->controller->getItems($productIds, $domains); |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | |
@@ -178,9 +178,9 @@ discard block |
||
| 178 | 178 | * @return array Ordered list of product items implementing \Aimeos\MShop\Product\Item\Iface |
| 179 | 179 | * @since 2015.08 |
| 180 | 180 | */ |
| 181 | - public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null ) |
|
| 181 | + public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null) |
|
| 182 | 182 | { |
| 183 | - return $this->controller->searchItems( $filter, $domains, $total ); |
|
| 183 | + return $this->controller->searchItems($filter, $domains, $total); |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | /** |
| 129 | 129 | * Returns the frontend controller |
| 130 | 130 | * |
| 131 | - * @return \Aimeos\Controller\Frontend\Service\Iface Frontend controller object |
|
| 131 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
| 132 | 132 | */ |
| 133 | 133 | protected function getController() |
| 134 | 134 | { |
@@ -30,13 +30,13 @@ discard block |
||
| 30 | 30 | * @param \Aimeos\Controller\Frontend\Iface $controller Controller object |
| 31 | 31 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
| 32 | 32 | */ |
| 33 | - public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context ) |
|
| 33 | + public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context) |
|
| 34 | 34 | { |
| 35 | 35 | $iface = '\Aimeos\Controller\Frontend\Service\Iface'; |
| 36 | - if( !( $controller instanceof $iface ) ) |
|
| 36 | + if (!($controller instanceof $iface)) |
|
| 37 | 37 | { |
| 38 | - $msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface ); |
|
| 39 | - throw new \Aimeos\Controller\Frontend\Exception( $msg ); |
|
| 38 | + $msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface); |
|
| 39 | + throw new \Aimeos\Controller\Frontend\Exception($msg); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $this->context = $context; |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | * @return mixed Returns the value of the called method |
| 53 | 53 | * @throws \Aimeos\Controller\Frontend\Exception If method call failed |
| 54 | 54 | */ |
| 55 | - public function __call( $name, array $param ) |
|
| 55 | + public function __call($name, array $param) |
|
| 56 | 56 | { |
| 57 | - return @call_user_func_array( array( $this->controller, $name ), $param ); |
|
| 57 | + return @call_user_func_array(array($this->controller, $name), $param); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | |
@@ -66,10 +66,10 @@ discard block |
||
| 66 | 66 | * @param array $ref List of domains for which the items referenced by the services should be fetched too |
| 67 | 67 | * @return array List of service items implementing \Aimeos\MShop\Service\Item\Iface with referenced items |
| 68 | 68 | */ |
| 69 | - public function getServices( $type, \Aimeos\MShop\Order\Item\Base\Iface $basket, |
|
| 70 | - $ref = array( 'media', 'price', 'text' ) ) |
|
| 69 | + public function getServices($type, \Aimeos\MShop\Order\Item\Base\Iface $basket, |
|
| 70 | + $ref = array('media', 'price', 'text')) |
|
| 71 | 71 | { |
| 72 | - return $this->controller->getServices( $type, $basket, $ref ); |
|
| 72 | + return $this->controller->getServices($type, $basket, $ref); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | |
@@ -82,9 +82,9 @@ discard block |
||
| 82 | 82 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object |
| 83 | 83 | * @return array List of attribute definitions implementing \Aimeos\MW\Criteria\Attribute\Iface |
| 84 | 84 | */ |
| 85 | - public function getServiceAttributes( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket ) |
|
| 85 | + public function getServiceAttributes($type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket) |
|
| 86 | 86 | { |
| 87 | - return $this->controller->getServiceAttributes( $type, $serviceId, $basket ); |
|
| 87 | + return $this->controller->getServiceAttributes($type, $serviceId, $basket); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | * @throws \Aimeos\MShop\Exception If service provider isn't available |
| 100 | 100 | * @throws \Exception If an error occurs |
| 101 | 101 | */ |
| 102 | - public function getServicePrice( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket ) |
|
| 102 | + public function getServicePrice($type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket) |
|
| 103 | 103 | { |
| 104 | - return $this->controller->getServicePrice( $type, $serviceId, $basket ); |
|
| 104 | + return $this->controller->getServicePrice($type, $serviceId, $basket); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | |
@@ -115,9 +115,9 @@ discard block |
||
| 115 | 115 | * @return array List of key/value pairs of attributes keys and an error message for values that are invalid or |
| 116 | 116 | * missing |
| 117 | 117 | */ |
| 118 | - public function checkServiceAttributes( $type, $serviceId, array $attributes ) |
|
| 118 | + public function checkServiceAttributes($type, $serviceId, array $attributes) |
|
| 119 | 119 | { |
| 120 | - return $this->controller->checkServiceAttributes( $type, $serviceId, $attributes ); |
|
| 120 | + return $this->controller->checkServiceAttributes($type, $serviceId, $attributes); |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * @param string|null $name Name of the controller implementaton (default: "Standard") |
| 30 | 30 | * @return \Aimeos\Controller\Frontend\Basket\Iface Controller object |
| 31 | 31 | */ |
| 32 | - public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null ) |
|
| 32 | + public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null) |
|
| 33 | 33 | { |
| 34 | 34 | /** controller/frontend/basket/name |
| 35 | 35 | * Class name of the used basket frontend controller implementation |
@@ -64,20 +64,20 @@ discard block |
||
| 64 | 64 | * @since 2014.03 |
| 65 | 65 | * @category Developer |
| 66 | 66 | */ |
| 67 | - if( $name === null ) { |
|
| 68 | - $name = $context->getConfig()->get( 'controller/frontend/basket/name', 'Standard' ); |
|
| 67 | + if ($name === null) { |
|
| 68 | + $name = $context->getConfig()->get('controller/frontend/basket/name', 'Standard'); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - if( ctype_alnum( $name ) === false ) |
|
| 71 | + if (ctype_alnum($name) === false) |
|
| 72 | 72 | { |
| 73 | - $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Basket\\' . $name : '<not a string>'; |
|
| 74 | - throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
| 73 | + $classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Basket\\' . $name : '<not a string>'; |
|
| 74 | + throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | $iface = '\\Aimeos\\Controller\\Frontend\\Basket\\Iface'; |
| 78 | 78 | $classname = '\\Aimeos\\Controller\\Frontend\\Basket\\' . $name; |
| 79 | 79 | |
| 80 | - $manager = self::createControllerBase( $context, $classname, $iface ); |
|
| 80 | + $manager = self::createControllerBase($context, $classname, $iface); |
|
| 81 | 81 | |
| 82 | 82 | /** controller/frontend/basket/decorators/excludes |
| 83 | 83 | * Excludes decorators added by the "common" option from the basket frontend controllers |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | * @see controller/frontend/basket/decorators/excludes |
| 154 | 154 | * @see controller/frontend/basket/decorators/global |
| 155 | 155 | */ |
| 156 | - return self::addControllerDecorators( $context, $manager, 'basket' ); |
|
| 156 | + return self::addControllerDecorators($context, $manager, 'basket'); |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * @param string|null $name Name of the controller implementaton (default: "Standard") |
| 30 | 30 | * @return \Aimeos\Controller\Frontend\Order\Iface Controller object |
| 31 | 31 | */ |
| 32 | - public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null ) |
|
| 32 | + public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null) |
|
| 33 | 33 | { |
| 34 | 34 | /** controller/frontend/order/name |
| 35 | 35 | * Class name of the used order frontend controller implementation |
@@ -64,19 +64,19 @@ discard block |
||
| 64 | 64 | * @since 2014.03 |
| 65 | 65 | * @category Developer |
| 66 | 66 | */ |
| 67 | - if( $name === null ) { |
|
| 68 | - $name = $context->getConfig()->get( 'controller/frontend/order/name', 'Standard' ); |
|
| 67 | + if ($name === null) { |
|
| 68 | + $name = $context->getConfig()->get('controller/frontend/order/name', 'Standard'); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - if( ctype_alnum( $name ) === false ) { |
|
| 72 | - $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Order\\' . $name : '<not a string>'; |
|
| 73 | - throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
| 71 | + if (ctype_alnum($name) === false) { |
|
| 72 | + $classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Order\\' . $name : '<not a string>'; |
|
| 73 | + throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | $iface = '\\Aimeos\\Controller\\Frontend\\Order\\Iface'; |
| 77 | 77 | $classname = '\\Aimeos\\Controller\\Frontend\\Order\\' . $name; |
| 78 | 78 | |
| 79 | - $manager = self::createControllerBase( $context, $classname, $iface ); |
|
| 79 | + $manager = self::createControllerBase($context, $classname, $iface); |
|
| 80 | 80 | |
| 81 | 81 | /** controller/frontend/order/decorators/excludes |
| 82 | 82 | * Excludes decorators added by the "common" option from the order frontend controllers |
@@ -152,6 +152,6 @@ discard block |
||
| 152 | 152 | * @see controller/frontend/order/decorators/excludes |
| 153 | 153 | * @see controller/frontend/order/decorators/global |
| 154 | 154 | */ |
| 155 | - return self::addControllerDecorators( $context, $manager, 'order' ); |
|
| 155 | + return self::addControllerDecorators($context, $manager, 'order'); |
|
| 156 | 156 | } |
| 157 | 157 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * @param string|null $name Name of the controller implementaton (default: "Standard") |
| 30 | 30 | * @return \Aimeos\Controller\Frontend\Catalog\Iface Controller object |
| 31 | 31 | */ |
| 32 | - public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null ) |
|
| 32 | + public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null) |
|
| 33 | 33 | { |
| 34 | 34 | /** controller/frontend/catalog/name |
| 35 | 35 | * Class name of the used catalog frontend controller implementation |
@@ -64,20 +64,20 @@ discard block |
||
| 64 | 64 | * @since 2014.03 |
| 65 | 65 | * @category Developer |
| 66 | 66 | */ |
| 67 | - if( $name === null ) { |
|
| 68 | - $name = $context->getConfig()->get( 'controller/frontend/catalog/name', 'Standard' ); |
|
| 67 | + if ($name === null) { |
|
| 68 | + $name = $context->getConfig()->get('controller/frontend/catalog/name', 'Standard'); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - if( ctype_alnum( $name ) === false ) |
|
| 71 | + if (ctype_alnum($name) === false) |
|
| 72 | 72 | { |
| 73 | - $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Catalog\\' . $name : '<not a string>'; |
|
| 74 | - throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
| 73 | + $classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Catalog\\' . $name : '<not a string>'; |
|
| 74 | + throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | $iface = '\\Aimeos\\Controller\\Frontend\\Catalog\\Iface'; |
| 78 | 78 | $classname = '\\Aimeos\\Controller\\Frontend\\Catalog\\' . $name; |
| 79 | 79 | |
| 80 | - $manager = self::createControllerBase( $context, $classname, $iface ); |
|
| 80 | + $manager = self::createControllerBase($context, $classname, $iface); |
|
| 81 | 81 | |
| 82 | 82 | /** controller/frontend/catalog/decorators/excludes |
| 83 | 83 | * Excludes decorators added by the "common" option from the catalog frontend controllers |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | * @see controller/frontend/catalog/decorators/excludes |
| 154 | 154 | * @see controller/frontend/catalog/decorators/global |
| 155 | 155 | */ |
| 156 | - return self::addControllerDecorators( $context, $manager, 'catalog' ); |
|
| 156 | + return self::addControllerDecorators($context, $manager, 'catalog'); |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * |
| 29 | 29 | * @param \Aimeos\MShop\Context\Item\Iface $context Common MShop context object |
| 30 | 30 | */ |
| 31 | - public function __construct( \Aimeos\MShop\Context\Item\Iface $context ) |
|
| 31 | + public function __construct(\Aimeos\MShop\Context\Item\Iface $context) |
|
| 32 | 32 | { |
| 33 | 33 | $this->context = $context; |
| 34 | 34 | } |
@@ -41,9 +41,9 @@ discard block |
||
| 41 | 41 | * @param array $param List of method parameter |
| 42 | 42 | * @throws \Aimeos\Controller\Frontend\Exception If method call failed |
| 43 | 43 | */ |
| 44 | - public function __call( $name, array $param ) |
|
| 44 | + public function __call($name, array $param) |
|
| 45 | 45 | { |
| 46 | - throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Unable to call method "%1$s"', $name ) ); |
|
| 46 | + throw new \Aimeos\Controller\Frontend\Exception(sprintf('Unable to call method "%1$s"', $name)); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * @param string|null $name Name of the controller implementaton (default: "Standard") |
| 30 | 30 | * @return \Aimeos\Controller\Frontend\Service\Iface Controller object |
| 31 | 31 | */ |
| 32 | - public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null ) |
|
| 32 | + public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null) |
|
| 33 | 33 | { |
| 34 | 34 | /** controller/frontend/service/name |
| 35 | 35 | * Class name of the used service frontend controller implementation |
@@ -64,19 +64,19 @@ discard block |
||
| 64 | 64 | * @since 2014.03 |
| 65 | 65 | * @category Developer |
| 66 | 66 | */ |
| 67 | - if( $name === null ) { |
|
| 68 | - $name = $context->getConfig()->get( 'controller/frontend/service/name', 'Standard' ); |
|
| 67 | + if ($name === null) { |
|
| 68 | + $name = $context->getConfig()->get('controller/frontend/service/name', 'Standard'); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - if( ctype_alnum( $name ) === false ) { |
|
| 72 | - $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Service\\' . $name : '<not a string>'; |
|
| 73 | - throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
| 71 | + if (ctype_alnum($name) === false) { |
|
| 72 | + $classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Service\\' . $name : '<not a string>'; |
|
| 73 | + throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | $iface = '\\Aimeos\\Controller\\Frontend\\Service\\Iface'; |
| 77 | 77 | $classname = '\\Aimeos\\Controller\\Frontend\\Service\\' . $name; |
| 78 | 78 | |
| 79 | - $manager = self::createControllerBase( $context, $classname, $iface ); |
|
| 79 | + $manager = self::createControllerBase($context, $classname, $iface); |
|
| 80 | 80 | |
| 81 | 81 | /** controller/frontend/service/decorators/excludes |
| 82 | 82 | * Excludes decorators added by the "common" option from the service frontend controllers |
@@ -152,6 +152,6 @@ discard block |
||
| 152 | 152 | * @see controller/frontend/service/decorators/excludes |
| 153 | 153 | * @see controller/frontend/service/decorators/global |
| 154 | 154 | */ |
| 155 | - return self::addControllerDecorators( $context, $manager, 'service' ); |
|
| 155 | + return self::addControllerDecorators($context, $manager, 'service'); |
|
| 156 | 156 | } |
| 157 | 157 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * @param string|null $name Name of the controller implementaton (default: "Standard") |
| 29 | 29 | * @return \Aimeos\Controller\Frontend\Product\Iface Controller object |
| 30 | 30 | */ |
| 31 | - public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null ) |
|
| 31 | + public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null) |
|
| 32 | 32 | { |
| 33 | 33 | /** controller/frontend/product/name |
| 34 | 34 | * Class name of the used product frontend controller implementation |
@@ -63,20 +63,20 @@ discard block |
||
| 63 | 63 | * @since 2017.03 |
| 64 | 64 | * @category Developer |
| 65 | 65 | */ |
| 66 | - if( $name === null ) { |
|
| 67 | - $name = $context->getConfig()->get( 'controller/frontend/product/name', 'Standard' ); |
|
| 66 | + if ($name === null) { |
|
| 67 | + $name = $context->getConfig()->get('controller/frontend/product/name', 'Standard'); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - if( ctype_alnum( $name ) === false ) |
|
| 70 | + if (ctype_alnum($name) === false) |
|
| 71 | 71 | { |
| 72 | - $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Product\\' . $name : '<not a string>'; |
|
| 73 | - throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
| 72 | + $classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Product\\' . $name : '<not a string>'; |
|
| 73 | + throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | $iface = '\\Aimeos\\Controller\\Frontend\\Product\\Iface'; |
| 77 | 77 | $classname = '\\Aimeos\\Controller\\Frontend\\Product\\' . $name; |
| 78 | 78 | |
| 79 | - $manager = self::createControllerBase( $context, $classname, $iface ); |
|
| 79 | + $manager = self::createControllerBase($context, $classname, $iface); |
|
| 80 | 80 | |
| 81 | 81 | /** controller/frontend/product/decorators/excludes |
| 82 | 82 | * Excludes decorators added by the "common" option from the product frontend controllers |
@@ -152,6 +152,6 @@ discard block |
||
| 152 | 152 | * @see controller/frontend/product/decorators/excludes |
| 153 | 153 | * @see controller/frontend/product/decorators/global |
| 154 | 154 | */ |
| 155 | - return self::addControllerDecorators( $context, $manager, 'product' ); |
|
| 155 | + return self::addControllerDecorators($context, $manager, 'product'); |
|
| 156 | 156 | } |
| 157 | 157 | } |