Completed
Push — master ( 55dc5c...4aebe4 )
by Aimeos
06:03
created
client/html/src/Client/Html/Common/Summary/Detail/Base.php 3 patches
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -19,88 +19,88 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 abstract class Base
22
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23 23
 {
24
-	/**
25
-	 * Returns a list of tax rates and values for the given basket.
26
-	 *
27
-	 * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket containing the products, services, etc.
28
-	 * @return array Associative list of tax rates as key and corresponding amounts as value
29
-	 */
30
-	protected function getTaxRates( \Aimeos\MShop\Order\Item\Base\Iface $basket )
31
-	{
32
-		$taxrates = array();
24
+    /**
25
+     * Returns a list of tax rates and values for the given basket.
26
+     *
27
+     * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket containing the products, services, etc.
28
+     * @return array Associative list of tax rates as key and corresponding amounts as value
29
+     */
30
+    protected function getTaxRates( \Aimeos\MShop\Order\Item\Base\Iface $basket )
31
+    {
32
+        $taxrates = array();
33 33
 
34
-		foreach( $basket->getProducts() as $product )
35
-		{
36
-			$price = clone $product->getPrice();
37
-			$taxrate = $price->getTaxrate();
34
+        foreach( $basket->getProducts() as $product )
35
+        {
36
+            $price = clone $product->getPrice();
37
+            $taxrate = $price->getTaxrate();
38 38
 
39
-			if( isset( $taxrates[$taxrate] ) ) {
40
-				$taxrates[$taxrate]->addItem( $price, $product->getQuantity() );
41
-			} else {
42
-				$taxrates[$taxrate] = $price->addItem( $price, $product->getQuantity() - 1 );
43
-			}
44
-		}
39
+            if( isset( $taxrates[$taxrate] ) ) {
40
+                $taxrates[$taxrate]->addItem( $price, $product->getQuantity() );
41
+            } else {
42
+                $taxrates[$taxrate] = $price->addItem( $price, $product->getQuantity() - 1 );
43
+            }
44
+        }
45 45
 
46
-		try
47
-		{
48
-			$price = clone $basket->getService( 'delivery' )->getPrice();
49
-			$taxrate = $price->getTaxrate();
46
+        try
47
+        {
48
+            $price = clone $basket->getService( 'delivery' )->getPrice();
49
+            $taxrate = $price->getTaxrate();
50 50
 
51
-			if( isset( $taxrates[$taxrate] ) ) {
52
-				$taxrates[$taxrate]->addItem( $price );
53
-			} else {
54
-				$taxrates[$taxrate] = $price;
55
-			}
56
-		}
57
-		catch( \Exception $e ) { ; } // if delivery service isn't available
51
+            if( isset( $taxrates[$taxrate] ) ) {
52
+                $taxrates[$taxrate]->addItem( $price );
53
+            } else {
54
+                $taxrates[$taxrate] = $price;
55
+            }
56
+        }
57
+        catch( \Exception $e ) { ; } // if delivery service isn't available
58 58
 
59
-		try
60
-		{
61
-			$price = clone $basket->getService( 'payment' )->getPrice();
62
-			$taxrate = $price->getTaxrate();
59
+        try
60
+        {
61
+            $price = clone $basket->getService( 'payment' )->getPrice();
62
+            $taxrate = $price->getTaxrate();
63 63
 
64
-			if( isset( $taxrates[$taxrate] ) ) {
65
-				$taxrates[$taxrate]->addItem( $price );
66
-			} else {
67
-				$taxrates[$taxrate] = $price;
68
-			}
69
-		}
70
-		catch( \Exception $e ) { ; } // if payment service isn't available
64
+            if( isset( $taxrates[$taxrate] ) ) {
65
+                $taxrates[$taxrate]->addItem( $price );
66
+            } else {
67
+                $taxrates[$taxrate] = $price;
68
+            }
69
+        }
70
+        catch( \Exception $e ) { ; } // if payment service isn't available
71 71
 
72
-		return $taxrates;
73
-	}
72
+        return $taxrates;
73
+    }
74 74
 
75 75
 
76
-	/**
77
-	 * Returns the payment status at which download files are shown
78
-	 *
79
-	 * @return integer Payment status from \Aimeos\MShop\Order\Item\Base
80
-	 */
81
-	protected function getDownloadPaymentStatus()
82
-	{
83
-		$config = $this->getContext()->getConfig();
84
-		$default = \Aimeos\MShop\Order\Item\Base::PAY_RECEIVED;
76
+    /**
77
+     * Returns the payment status at which download files are shown
78
+     *
79
+     * @return integer Payment status from \Aimeos\MShop\Order\Item\Base
80
+     */
81
+    protected function getDownloadPaymentStatus()
82
+    {
83
+        $config = $this->getContext()->getConfig();
84
+        $default = \Aimeos\MShop\Order\Item\Base::PAY_RECEIVED;
85 85
 
86
-		/** client/html/common/summary/detail/download/payment-status
87
-		 * Minium payment status value for product download files
88
-		 *
89
-		 * This setting specifies the payment status value of an order for which
90
-		 * links to bought product download files are shown on the "thank you"
91
-		 * page, in the "MyAccount" and in the e-mails sent to the customers.
92
-		 *
93
-		 * The value is one of the payment constant values from
94
-		 * {@link https://github.com/aimeos/aimeos-core/blob/master/lib/mshoplib/src/MShop/Order/Item/Base.php#L105}.
95
-		 * Most of the time, only two values are of interest:
96
-		 * * 5: payment authorized
97
-		 * * 6: payment received
98
-		 *
99
-		 * @param integer Order payment constant value
100
-		 * @since 2016.3
101
-		 * @category User
102
-		 * @category Developer
103
-		 */
104
-		return $config->get( 'client/html/common/summary/detail/download/payment-status', $default );
105
-	}
86
+        /** client/html/common/summary/detail/download/payment-status
87
+         * Minium payment status value for product download files
88
+         *
89
+         * This setting specifies the payment status value of an order for which
90
+         * links to bought product download files are shown on the "thank you"
91
+         * page, in the "MyAccount" and in the e-mails sent to the customers.
92
+         *
93
+         * The value is one of the payment constant values from
94
+         * {@link https://github.com/aimeos/aimeos-core/blob/master/lib/mshoplib/src/MShop/Order/Item/Base.php#L105}.
95
+         * Most of the time, only two values are of interest:
96
+         * * 5: payment authorized
97
+         * * 6: payment received
98
+         *
99
+         * @param integer Order payment constant value
100
+         * @since 2016.3
101
+         * @category User
102
+         * @category Developer
103
+         */
104
+        return $config->get( 'client/html/common/summary/detail/download/payment-status', $default );
105
+    }
106 106
 }
107 107
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,47 +27,47 @@  discard block
 block discarded – undo
27 27
 	 * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket containing the products, services, etc.
28 28
 	 * @return array Associative list of tax rates as key and corresponding amounts as value
29 29
 	 */
30
-	protected function getTaxRates( \Aimeos\MShop\Order\Item\Base\Iface $basket )
30
+	protected function getTaxRates(\Aimeos\MShop\Order\Item\Base\Iface $basket)
31 31
 	{
32 32
 		$taxrates = array();
33 33
 
34
-		foreach( $basket->getProducts() as $product )
34
+		foreach ($basket->getProducts() as $product)
35 35
 		{
36 36
 			$price = clone $product->getPrice();
37 37
 			$taxrate = $price->getTaxrate();
38 38
 
39
-			if( isset( $taxrates[$taxrate] ) ) {
40
-				$taxrates[$taxrate]->addItem( $price, $product->getQuantity() );
39
+			if (isset($taxrates[$taxrate])) {
40
+				$taxrates[$taxrate]->addItem($price, $product->getQuantity());
41 41
 			} else {
42
-				$taxrates[$taxrate] = $price->addItem( $price, $product->getQuantity() - 1 );
42
+				$taxrates[$taxrate] = $price->addItem($price, $product->getQuantity() - 1);
43 43
 			}
44 44
 		}
45 45
 
46 46
 		try
47 47
 		{
48
-			$price = clone $basket->getService( 'delivery' )->getPrice();
48
+			$price = clone $basket->getService('delivery')->getPrice();
49 49
 			$taxrate = $price->getTaxrate();
50 50
 
51
-			if( isset( $taxrates[$taxrate] ) ) {
52
-				$taxrates[$taxrate]->addItem( $price );
51
+			if (isset($taxrates[$taxrate])) {
52
+				$taxrates[$taxrate]->addItem($price);
53 53
 			} else {
54 54
 				$taxrates[$taxrate] = $price;
55 55
 			}
56 56
 		}
57
-		catch( \Exception $e ) { ; } // if delivery service isn't available
57
+		catch (\Exception $e) {; } // if delivery service isn't available
58 58
 
59 59
 		try
60 60
 		{
61
-			$price = clone $basket->getService( 'payment' )->getPrice();
61
+			$price = clone $basket->getService('payment')->getPrice();
62 62
 			$taxrate = $price->getTaxrate();
63 63
 
64
-			if( isset( $taxrates[$taxrate] ) ) {
65
-				$taxrates[$taxrate]->addItem( $price );
64
+			if (isset($taxrates[$taxrate])) {
65
+				$taxrates[$taxrate]->addItem($price);
66 66
 			} else {
67 67
 				$taxrates[$taxrate] = $price;
68 68
 			}
69 69
 		}
70
-		catch( \Exception $e ) { ; } // if payment service isn't available
70
+		catch (\Exception $e) {; } // if payment service isn't available
71 71
 
72 72
 		return $taxrates;
73 73
 	}
@@ -101,6 +101,6 @@  discard block
 block discarded – undo
101 101
 		 * @category User
102 102
 		 * @category Developer
103 103
 		 */
104
-		return $config->get( 'client/html/common/summary/detail/download/payment-status', $default );
104
+		return $config->get('client/html/common/summary/detail/download/payment-status', $default);
105 105
 	}
106 106
 }
107 107
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
 			} else {
54 54
 				$taxrates[$taxrate] = $price;
55 55
 			}
56
-		}
57
-		catch( \Exception $e ) { ; } // if delivery service isn't available
56
+		} catch( \Exception $e ) { ; } // if delivery service isn't available
58 57
 
59 58
 		try
60 59
 		{
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
 			} else {
67 66
 				$taxrates[$taxrate] = $price;
68 67
 			}
69
-		}
70
-		catch( \Exception $e ) { ; } // if payment service isn't available
68
+		} catch( \Exception $e ) { ; } // if payment service isn't available
71 69
 
72 70
 		return $taxrates;
73 71
 	}
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Summary/Address/Base.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 abstract class Base
22
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23 23
 {
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Client/Factory/Iface.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,5 +29,5 @@
 block discarded – undo
29 29
 	 * 	and a list of relative paths inside the core or the extension as values
30 30
 	 * @return void
31 31
 	 */
32
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
32
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths);
33 33
 }
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 interface Iface
22
-	extends \Aimeos\Client\Html\Iface
22
+    extends \Aimeos\Client\Html\Iface
23 23
 {
24
-	/**
25
-	 * Initializes the class instance.
26
-	 *
27
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
28
-	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
29
-	 * 	and a list of relative paths inside the core or the extension as values
30
-	 */
31
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
24
+    /**
25
+     * Initializes the class instance.
26
+     *
27
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context object
28
+     * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
29
+     * 	and a list of relative paths inside the core or the extension as values
30
+     */
31
+    public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
32 32
 }
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Client/Factory/Base.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
 	 * 	and a list of relative paths inside the core or the extension as values
30 30
 	 * @param \Aimeos\Client\Html\Iface $client Client object
31 31
 	 */
32
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
32
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths)
33 33
 	{
34
-		parent::__construct( $context, $templatePaths );
34
+		parent::__construct($context, $templatePaths);
35 35
 	}
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -18,18 +18,18 @@
 block discarded – undo
18 18
  * @subpackage Html
19 19
  */
20 20
 abstract class Base
21
-	extends \Aimeos\Client\Html\Base
22
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
21
+    extends \Aimeos\Client\Html\Base
22
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
23 23
 {
24
-	/**
25
-	 * Initializes the object instance
26
-	 *
27
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
28
-	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
29
-	 * 	and a list of relative paths inside the core or the extension as values
30
-	 */
31
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
32
-	{
33
-		parent::__construct( $context, $templatePaths );
34
-	}
24
+    /**
25
+     * Initializes the object instance
26
+     *
27
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
28
+     * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
29
+     * 	and a list of relative paths inside the core or the extension as values
30
+     */
31
+    public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
32
+    {
33
+        parent::__construct( $context, $templatePaths );
34
+    }
35 35
 }
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Decorator/Iface.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,16 +19,16 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 interface Iface
22
-	extends \Aimeos\Client\Html\Iface
22
+    extends \Aimeos\Client\Html\Iface
23 23
 {
24
-	/**
25
-	 * Initializes a new client decorator object.
26
-	 *
27
-	 * @param \Aimeos\Client\Html\Iface $client Client object
28
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
29
-	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
30
-	 * 	and a list of relative paths inside the core or the extension as values
31
-	 */
32
-	public function __construct( \Aimeos\Client\Html\Iface $client,
33
-		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
24
+    /**
25
+     * Initializes a new client decorator object.
26
+     *
27
+     * @param \Aimeos\Client\Html\Iface $client Client object
28
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
29
+     * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
30
+     * 	and a list of relative paths inside the core or the extension as values
31
+     */
32
+    public function __construct( \Aimeos\Client\Html\Iface $client,
33
+        \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
29 29
 	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
30 30
 	 * 	and a list of relative paths inside the core or the extension as values
31 31
 	 */
32
-	public function __construct( \Aimeos\Client\Html\Iface $client,
33
-		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
32
+	public function __construct(\Aimeos\Client\Html\Iface $client,
33
+		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths);
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Factory/Iface.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
  */
21 21
 interface Iface
22 22
 {
23
-	/**
24
-	 *	Creates a client object.
25
-	 *
26
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
27
-	 * @param array List of file system paths where the templates are stored
28
-	 * @param string $name Client name (from configuration or "Standard" if null)
29
-	 * @return \Aimeos\Client\Html\Iface New client object
30
-	 */
31
-	public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null );
23
+    /**
24
+     *	Creates a client object.
25
+     *
26
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
27
+     * @param array List of file system paths where the templates are stored
28
+     * @param string $name Client name (from configuration or "Standard" if null)
29
+     * @return \Aimeos\Client\Html\Iface New client object
30
+     */
31
+    public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null );
32 32
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,5 +28,5 @@
 block discarded – undo
28 28
 	 * @param string $name Client name (from configuration or "Standard" if null)
29 29
 	 * @return \Aimeos\Client\Html\Iface New client object
30 30
 	 */
31
-	public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null );
31
+	public static function createClient(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null);
32 32
 }
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Factory/Base.php 2 patches
Indentation   +151 added lines, -151 removed lines patch added patch discarded remove patch
@@ -20,155 +20,155 @@
 block discarded – undo
20 20
  */
21 21
 class Base
22 22
 {
23
-	private static $objects = array();
24
-
25
-
26
-	/**
27
-	 * Injects a client object.
28
-	 * The object is returned via createClient() if an instance of the class
29
-	 * with the name name is requested.
30
-	 *
31
-	 * @param string $classname Full name of the class for which the object should be returned
32
-	 * @param \Aimeos\Client\Html\Iface|null $client ExtJS client object
33
-	 */
34
-	public static function injectClient( $classname, \Aimeos\Client\Html\Iface $client = null )
35
-	{
36
-		self::$objects[$classname] = $client;
37
-	}
38
-
39
-
40
-	/**
41
-	 * Adds the decorators to the client object.
42
-	 *
43
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
44
-	 * @param \Aimeos\Client\Html\Iface $client Client object
45
-	 * @param array $templatePaths List of file system paths where the templates are stored
46
-	 * @param array $decorators List of decorator name that should be wrapped around the client
47
-	 * @param string $classprefix Decorator class prefix, e.g. "\Aimeos\Client\Html\Catalog\Decorator\"
48
-	 * @return \Aimeos\Client\Html\Iface Client object
49
-	 */
50
-	protected static function addDecorators( \Aimeos\MShop\Context\Item\Iface $context,
51
-		\Aimeos\Client\Html\Iface $client, array $templatePaths, array $decorators, $classprefix )
52
-	{
53
-		$iface = '\\Aimeos\\Client\\Html\\Common\\Decorator\\Iface';
54
-
55
-		foreach( $decorators as $name )
56
-		{
57
-			if( ctype_alnum( $name ) === false )
58
-			{
59
-				$classname = is_string( $name ) ? $classprefix . $name : '<not a string>';
60
-				throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid class name "%1$s"', $classname ) );
61
-			}
62
-
63
-			$classname = $classprefix . $name;
64
-
65
-			if( class_exists( $classname ) === false ) {
66
-				throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" not found', $classname ) );
67
-			}
68
-
69
-			$client = new $classname( $client, $context, $templatePaths );
70
-
71
-			if( !( $client instanceof $iface ) ) {
72
-				throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" does not implement "%2$s"', $classname, $iface ) );
73
-			}
74
-		}
75
-
76
-		return $client;
77
-	}
78
-
79
-
80
-	/**
81
-	 * Adds the decorators to the client object.
82
-	 *
83
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
84
-	 * @param \Aimeos\Client\Html\Iface $client Client object
85
-	 * @param array $templatePaths List of file system paths where the templates are stored
86
-	 * @param string $path Path of the client in lower case, e.g. "catalog/detail"
87
-	 * @return \Aimeos\Client\Html\Iface Client object
88
-	 */
89
-	protected static function addClientDecorators( \Aimeos\MShop\Context\Item\Iface $context,
90
-		\Aimeos\Client\Html\Iface $client, array $templatePaths, $path )
91
-	{
92
-		if( !is_string( $path ) || $path === '' ) {
93
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid domain "%1$s"', $path ) );
94
-		}
95
-
96
-		$localClass = str_replace( ' ', '\\', ucwords( str_replace( '/', ' ', $path ) ) );
97
-		$config = $context->getConfig();
98
-
99
-		/** client/html/common/decorators/default
100
-		 * Configures the list of decorators applied to all html clients
101
-		 *
102
-		 * Decorators extend the functionality of a class by adding new aspects
103
-		 * (e.g. log what is currently done), executing the methods of the underlying
104
-		 * class only in certain conditions (e.g. only for logged in users) or
105
-		 * modify what is returned to the caller.
106
-		 *
107
-		 * This option allows you to configure a list of decorator names that should
108
-		 * be wrapped around the original instance of all created clients:
109
-		 *
110
-		 *  client/html/common/decorators/default = array( 'decorator1', 'decorator2' )
111
-		 *
112
-		 * This would wrap the decorators named "decorator1" and "decorator2" around
113
-		 * all client instances in that order. The decorator classes would be
114
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" and
115
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator2".
116
-		 *
117
-		 * @param array List of decorator names
118
-		 * @since 2014.03
119
-		 * @category Developer
120
-		 */
121
-		$decorators = $config->get( 'client/html/common/decorators/default', array() );
122
-		$excludes = $config->get( 'client/html/' . $path . '/decorators/excludes', array() );
123
-
124
-		foreach( $decorators as $key => $name )
125
-		{
126
-			if( in_array( $name, $excludes ) ) {
127
-				unset( $decorators[$key] );
128
-			}
129
-		}
130
-
131
-		$classprefix = '\\Aimeos\\Client\\Html\\Common\\Decorator\\';
132
-		$client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
133
-
134
-		$classprefix = '\\Aimeos\\Client\\Html\\Common\\Decorator\\';
135
-		$decorators = $config->get( 'client/html/' . $path . '/decorators/global', array() );
136
-		$client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
137
-
138
-		$classprefix = '\\Aimeos\\Client\\Html\\' . $localClass . '\\Decorator\\';
139
-		$decorators = $config->get( 'client/html/' . $path . '/decorators/local', array() );
140
-		$client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
141
-
142
-		return $client;
143
-	}
144
-
145
-
146
-	/**
147
-	 * Creates a client object.
148
-	 *
149
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
150
-	 * @param string $classname Name of the client class
151
-	 * @param string $interface Name of the client interface
152
-	 * @param array $templatePaths List of file system paths where the templates are stored
153
-	 * @return \Aimeos\Client\Html\\Iface Client object
154
-	 * @throws \Aimeos\Client\Html\Exception If client couldn't be found or doesn't implement the interface
155
-	 */
156
-	protected static function createClientBase( \Aimeos\MShop\Context\Item\Iface $context, $classname, $interface, $templatePaths )
157
-	{
158
-		if( isset( self::$objects[$classname] ) ) {
159
-			return self::$objects[$classname];
160
-		}
161
-
162
-		if( class_exists( $classname ) === false ) {
163
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
164
-		}
165
-
166
-		$client = new $classname( $context, $templatePaths );
167
-
168
-		if( !( $client instanceof $interface ) ) {
169
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" does not implement interface "%2$s"', $classname, $interface ) );
170
-		}
171
-
172
-		return $client;
173
-	}
23
+    private static $objects = array();
24
+
25
+
26
+    /**
27
+     * Injects a client object.
28
+     * The object is returned via createClient() if an instance of the class
29
+     * with the name name is requested.
30
+     *
31
+     * @param string $classname Full name of the class for which the object should be returned
32
+     * @param \Aimeos\Client\Html\Iface|null $client ExtJS client object
33
+     */
34
+    public static function injectClient( $classname, \Aimeos\Client\Html\Iface $client = null )
35
+    {
36
+        self::$objects[$classname] = $client;
37
+    }
38
+
39
+
40
+    /**
41
+     * Adds the decorators to the client object.
42
+     *
43
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
44
+     * @param \Aimeos\Client\Html\Iface $client Client object
45
+     * @param array $templatePaths List of file system paths where the templates are stored
46
+     * @param array $decorators List of decorator name that should be wrapped around the client
47
+     * @param string $classprefix Decorator class prefix, e.g. "\Aimeos\Client\Html\Catalog\Decorator\"
48
+     * @return \Aimeos\Client\Html\Iface Client object
49
+     */
50
+    protected static function addDecorators( \Aimeos\MShop\Context\Item\Iface $context,
51
+        \Aimeos\Client\Html\Iface $client, array $templatePaths, array $decorators, $classprefix )
52
+    {
53
+        $iface = '\\Aimeos\\Client\\Html\\Common\\Decorator\\Iface';
54
+
55
+        foreach( $decorators as $name )
56
+        {
57
+            if( ctype_alnum( $name ) === false )
58
+            {
59
+                $classname = is_string( $name ) ? $classprefix . $name : '<not a string>';
60
+                throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid class name "%1$s"', $classname ) );
61
+            }
62
+
63
+            $classname = $classprefix . $name;
64
+
65
+            if( class_exists( $classname ) === false ) {
66
+                throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" not found', $classname ) );
67
+            }
68
+
69
+            $client = new $classname( $client, $context, $templatePaths );
70
+
71
+            if( !( $client instanceof $iface ) ) {
72
+                throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" does not implement "%2$s"', $classname, $iface ) );
73
+            }
74
+        }
75
+
76
+        return $client;
77
+    }
78
+
79
+
80
+    /**
81
+     * Adds the decorators to the client object.
82
+     *
83
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
84
+     * @param \Aimeos\Client\Html\Iface $client Client object
85
+     * @param array $templatePaths List of file system paths where the templates are stored
86
+     * @param string $path Path of the client in lower case, e.g. "catalog/detail"
87
+     * @return \Aimeos\Client\Html\Iface Client object
88
+     */
89
+    protected static function addClientDecorators( \Aimeos\MShop\Context\Item\Iface $context,
90
+        \Aimeos\Client\Html\Iface $client, array $templatePaths, $path )
91
+    {
92
+        if( !is_string( $path ) || $path === '' ) {
93
+            throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid domain "%1$s"', $path ) );
94
+        }
95
+
96
+        $localClass = str_replace( ' ', '\\', ucwords( str_replace( '/', ' ', $path ) ) );
97
+        $config = $context->getConfig();
98
+
99
+        /** client/html/common/decorators/default
100
+         * Configures the list of decorators applied to all html clients
101
+         *
102
+         * Decorators extend the functionality of a class by adding new aspects
103
+         * (e.g. log what is currently done), executing the methods of the underlying
104
+         * class only in certain conditions (e.g. only for logged in users) or
105
+         * modify what is returned to the caller.
106
+         *
107
+         * This option allows you to configure a list of decorator names that should
108
+         * be wrapped around the original instance of all created clients:
109
+         *
110
+         *  client/html/common/decorators/default = array( 'decorator1', 'decorator2' )
111
+         *
112
+         * This would wrap the decorators named "decorator1" and "decorator2" around
113
+         * all client instances in that order. The decorator classes would be
114
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" and
115
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator2".
116
+         *
117
+         * @param array List of decorator names
118
+         * @since 2014.03
119
+         * @category Developer
120
+         */
121
+        $decorators = $config->get( 'client/html/common/decorators/default', array() );
122
+        $excludes = $config->get( 'client/html/' . $path . '/decorators/excludes', array() );
123
+
124
+        foreach( $decorators as $key => $name )
125
+        {
126
+            if( in_array( $name, $excludes ) ) {
127
+                unset( $decorators[$key] );
128
+            }
129
+        }
130
+
131
+        $classprefix = '\\Aimeos\\Client\\Html\\Common\\Decorator\\';
132
+        $client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
133
+
134
+        $classprefix = '\\Aimeos\\Client\\Html\\Common\\Decorator\\';
135
+        $decorators = $config->get( 'client/html/' . $path . '/decorators/global', array() );
136
+        $client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
137
+
138
+        $classprefix = '\\Aimeos\\Client\\Html\\' . $localClass . '\\Decorator\\';
139
+        $decorators = $config->get( 'client/html/' . $path . '/decorators/local', array() );
140
+        $client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
141
+
142
+        return $client;
143
+    }
144
+
145
+
146
+    /**
147
+     * Creates a client object.
148
+     *
149
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
150
+     * @param string $classname Name of the client class
151
+     * @param string $interface Name of the client interface
152
+     * @param array $templatePaths List of file system paths where the templates are stored
153
+     * @return \Aimeos\Client\Html\\Iface Client object
154
+     * @throws \Aimeos\Client\Html\Exception If client couldn't be found or doesn't implement the interface
155
+     */
156
+    protected static function createClientBase( \Aimeos\MShop\Context\Item\Iface $context, $classname, $interface, $templatePaths )
157
+    {
158
+        if( isset( self::$objects[$classname] ) ) {
159
+            return self::$objects[$classname];
160
+        }
161
+
162
+        if( class_exists( $classname ) === false ) {
163
+            throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
164
+        }
165
+
166
+        $client = new $classname( $context, $templatePaths );
167
+
168
+        if( !( $client instanceof $interface ) ) {
169
+            throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" does not implement interface "%2$s"', $classname, $interface ) );
170
+        }
171
+
172
+        return $client;
173
+    }
174 174
 }
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @param string $classname Full name of the class for which the object should be returned
32 32
 	 * @param \Aimeos\Client\Html\Iface|null $client ExtJS client object
33 33
 	 */
34
-	public static function injectClient( $classname, \Aimeos\Client\Html\Iface $client = null )
34
+	public static function injectClient($classname, \Aimeos\Client\Html\Iface $client = null)
35 35
 	{
36 36
 		self::$objects[$classname] = $client;
37 37
 	}
@@ -47,29 +47,29 @@  discard block
 block discarded – undo
47 47
 	 * @param string $classprefix Decorator class prefix, e.g. "\Aimeos\Client\Html\Catalog\Decorator\"
48 48
 	 * @return \Aimeos\Client\Html\Iface Client object
49 49
 	 */
50
-	protected static function addDecorators( \Aimeos\MShop\Context\Item\Iface $context,
51
-		\Aimeos\Client\Html\Iface $client, array $templatePaths, array $decorators, $classprefix )
50
+	protected static function addDecorators(\Aimeos\MShop\Context\Item\Iface $context,
51
+		\Aimeos\Client\Html\Iface $client, array $templatePaths, array $decorators, $classprefix)
52 52
 	{
53 53
 		$iface = '\\Aimeos\\Client\\Html\\Common\\Decorator\\Iface';
54 54
 
55
-		foreach( $decorators as $name )
55
+		foreach ($decorators as $name)
56 56
 		{
57
-			if( ctype_alnum( $name ) === false )
57
+			if (ctype_alnum($name) === false)
58 58
 			{
59
-				$classname = is_string( $name ) ? $classprefix . $name : '<not a string>';
60
-				throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid class name "%1$s"', $classname ) );
59
+				$classname = is_string($name) ? $classprefix.$name : '<not a string>';
60
+				throw new \Aimeos\Client\Html\Exception(sprintf('Invalid class name "%1$s"', $classname));
61 61
 			}
62 62
 
63
-			$classname = $classprefix . $name;
63
+			$classname = $classprefix.$name;
64 64
 
65
-			if( class_exists( $classname ) === false ) {
66
-				throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" not found', $classname ) );
65
+			if (class_exists($classname) === false) {
66
+				throw new \Aimeos\Client\Html\Exception(sprintf('Class "%1$s" not found', $classname));
67 67
 			}
68 68
 
69
-			$client = new $classname( $client, $context, $templatePaths );
69
+			$client = new $classname($client, $context, $templatePaths);
70 70
 
71
-			if( !( $client instanceof $iface ) ) {
72
-				throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" does not implement "%2$s"', $classname, $iface ) );
71
+			if (!($client instanceof $iface)) {
72
+				throw new \Aimeos\Client\Html\Exception(sprintf('Class "%1$s" does not implement "%2$s"', $classname, $iface));
73 73
 			}
74 74
 		}
75 75
 
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
 	 * @param string $path Path of the client in lower case, e.g. "catalog/detail"
87 87
 	 * @return \Aimeos\Client\Html\Iface Client object
88 88
 	 */
89
-	protected static function addClientDecorators( \Aimeos\MShop\Context\Item\Iface $context,
90
-		\Aimeos\Client\Html\Iface $client, array $templatePaths, $path )
89
+	protected static function addClientDecorators(\Aimeos\MShop\Context\Item\Iface $context,
90
+		\Aimeos\Client\Html\Iface $client, array $templatePaths, $path)
91 91
 	{
92
-		if( !is_string( $path ) || $path === '' ) {
93
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid domain "%1$s"', $path ) );
92
+		if (!is_string($path) || $path === '') {
93
+			throw new \Aimeos\Client\Html\Exception(sprintf('Invalid domain "%1$s"', $path));
94 94
 		}
95 95
 
96
-		$localClass = str_replace( ' ', '\\', ucwords( str_replace( '/', ' ', $path ) ) );
96
+		$localClass = str_replace(' ', '\\', ucwords(str_replace('/', ' ', $path)));
97 97
 		$config = $context->getConfig();
98 98
 
99 99
 		/** client/html/common/decorators/default
@@ -118,26 +118,26 @@  discard block
 block discarded – undo
118 118
 		 * @since 2014.03
119 119
 		 * @category Developer
120 120
 		 */
121
-		$decorators = $config->get( 'client/html/common/decorators/default', array() );
122
-		$excludes = $config->get( 'client/html/' . $path . '/decorators/excludes', array() );
121
+		$decorators = $config->get('client/html/common/decorators/default', array());
122
+		$excludes = $config->get('client/html/'.$path.'/decorators/excludes', array());
123 123
 
124
-		foreach( $decorators as $key => $name )
124
+		foreach ($decorators as $key => $name)
125 125
 		{
126
-			if( in_array( $name, $excludes ) ) {
127
-				unset( $decorators[$key] );
126
+			if (in_array($name, $excludes)) {
127
+				unset($decorators[$key]);
128 128
 			}
129 129
 		}
130 130
 
131 131
 		$classprefix = '\\Aimeos\\Client\\Html\\Common\\Decorator\\';
132
-		$client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
132
+		$client = self::addDecorators($context, $client, $templatePaths, $decorators, $classprefix);
133 133
 
134 134
 		$classprefix = '\\Aimeos\\Client\\Html\\Common\\Decorator\\';
135
-		$decorators = $config->get( 'client/html/' . $path . '/decorators/global', array() );
136
-		$client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
135
+		$decorators = $config->get('client/html/'.$path.'/decorators/global', array());
136
+		$client = self::addDecorators($context, $client, $templatePaths, $decorators, $classprefix);
137 137
 
138
-		$classprefix = '\\Aimeos\\Client\\Html\\' . $localClass . '\\Decorator\\';
139
-		$decorators = $config->get( 'client/html/' . $path . '/decorators/local', array() );
140
-		$client = self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix );
138
+		$classprefix = '\\Aimeos\\Client\\Html\\'.$localClass.'\\Decorator\\';
139
+		$decorators = $config->get('client/html/'.$path.'/decorators/local', array());
140
+		$client = self::addDecorators($context, $client, $templatePaths, $decorators, $classprefix);
141 141
 
142 142
 		return $client;
143 143
 	}
@@ -153,20 +153,20 @@  discard block
 block discarded – undo
153 153
 	 * @return \Aimeos\Client\Html\\Iface Client object
154 154
 	 * @throws \Aimeos\Client\Html\Exception If client couldn't be found or doesn't implement the interface
155 155
 	 */
156
-	protected static function createClientBase( \Aimeos\MShop\Context\Item\Iface $context, $classname, $interface, $templatePaths )
156
+	protected static function createClientBase(\Aimeos\MShop\Context\Item\Iface $context, $classname, $interface, $templatePaths)
157 157
 	{
158
-		if( isset( self::$objects[$classname] ) ) {
158
+		if (isset(self::$objects[$classname])) {
159 159
 			return self::$objects[$classname];
160 160
 		}
161 161
 
162
-		if( class_exists( $classname ) === false ) {
163
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
162
+		if (class_exists($classname) === false) {
163
+			throw new \Aimeos\Client\Html\Exception(sprintf('Class "%1$s" not available', $classname));
164 164
 		}
165 165
 
166
-		$client = new $classname( $context, $templatePaths );
166
+		$client = new $classname($context, $templatePaths);
167 167
 
168
-		if( !( $client instanceof $interface ) ) {
169
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Class "%1$s" does not implement interface "%2$s"', $classname, $interface ) );
168
+		if (!($client instanceof $interface)) {
169
+			throw new \Aimeos\Client\Html\Exception(sprintf('Class "%1$s" does not implement interface "%2$s"', $classname, $interface));
170 170
 		}
171 171
 
172 172
 		return $client;
Please login to merge, or discard this patch.
client/html/src/Client/Html/Iface.php 2 patches
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -20,74 +20,74 @@
 block discarded – undo
20 20
  */
21 21
 interface Iface
22 22
 {
23
-	/**
24
-	 * Returns the sub-client given by its name.
25
-	 *
26
-	 * @param string $type Name of the client type
27
-	 * @param string|null $name Name of the sub-client (Default if null)
28
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
29
-	 */
30
-	public function getSubClient( $type, $name = null );
23
+    /**
24
+     * Returns the sub-client given by its name.
25
+     *
26
+     * @param string $type Name of the client type
27
+     * @param string|null $name Name of the sub-client (Default if null)
28
+     * @return \Aimeos\Client\Html\Iface Sub-client object
29
+     */
30
+    public function getSubClient( $type, $name = null );
31 31
 
32
-	/**
33
-	 * Returns the HTML string for insertion into the header.
34
-	 *
35
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
36
-	 * @param array &$tags Result array for the list of tags that are associated to the output
37
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
38
-	 * @return string|null String including HTML tags for the header on error
39
-	 */
40
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null );
32
+    /**
33
+     * Returns the HTML string for insertion into the header.
34
+     *
35
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
36
+     * @param array &$tags Result array for the list of tags that are associated to the output
37
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
38
+     * @return string|null String including HTML tags for the header on error
39
+     */
40
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null );
41 41
 
42
-	/**
43
-	 * Returns the HTML code for insertion into the body.
44
-	 *
45
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
46
-	 * @param array &$tags Result array for the list of tags that are associated to the output
47
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
48
-	 * @return string HTML code
49
-	 */
50
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null );
42
+    /**
43
+     * Returns the HTML code for insertion into the body.
44
+     *
45
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
46
+     * @param array &$tags Result array for the list of tags that are associated to the output
47
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
48
+     * @return string HTML code
49
+     */
50
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null );
51 51
 
52
-	/**
53
-	 * Returns the view object that will generate the HTML output.
54
-	 *
55
-	 * @return \Aimeos\MW\View\Iface $view The view object which generates the HTML output
56
-	 */
57
-	public function getView();
52
+    /**
53
+     * Returns the view object that will generate the HTML output.
54
+     *
55
+     * @return \Aimeos\MW\View\Iface $view The view object which generates the HTML output
56
+     */
57
+    public function getView();
58 58
 
59
-	/**
60
-	 * Sets the view object that will generate the HTML output.
61
-	 *
62
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
63
-	 * @return \Aimeos\Client\Html\Iface Reference to this object for fluent calls
64
-	 */
65
-	public function setView( \Aimeos\MW\View\Iface $view );
59
+    /**
60
+     * Sets the view object that will generate the HTML output.
61
+     *
62
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
63
+     * @return \Aimeos\Client\Html\Iface Reference to this object for fluent calls
64
+     */
65
+    public function setView( \Aimeos\MW\View\Iface $view );
66 66
 
67
-	/**
68
-	 * Modifies the cached body content to replace content based on sessions or cookies.
69
-	 *
70
-	 * @param string $content Cached content
71
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
72
-	 * @return string Modified body content
73
-	 */
74
-	public function modifyBody( $content, $uid );
67
+    /**
68
+     * Modifies the cached body content to replace content based on sessions or cookies.
69
+     *
70
+     * @param string $content Cached content
71
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
72
+     * @return string Modified body content
73
+     */
74
+    public function modifyBody( $content, $uid );
75 75
 
76
-	/**
77
-	 * Modifies the cached header content to replace content based on sessions or cookies.
78
-	 *
79
-	 * @param string $content Cached content
80
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
81
-	 * @return string Modified header content
82
-	 */
83
-	public function modifyHeader( $content, $uid );
76
+    /**
77
+     * Modifies the cached header content to replace content based on sessions or cookies.
78
+     *
79
+     * @param string $content Cached content
80
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
81
+     * @return string Modified header content
82
+     */
83
+    public function modifyHeader( $content, $uid );
84 84
 
85
-	/**
86
-	 * Processes the input, e.g. store given values.
87
-	 * A view must be available and this method doesn't generate any output
88
-	 * besides setting view variables.
89
-	 *
90
-	 * @return boolean False if processing is stopped, otherwise all processing was completed successfully
91
-	 */
92
-	public function process();
85
+    /**
86
+     * Processes the input, e.g. store given values.
87
+     * A view must be available and this method doesn't generate any output
88
+     * besides setting view variables.
89
+     *
90
+     * @return boolean False if processing is stopped, otherwise all processing was completed successfully
91
+     */
92
+    public function process();
93 93
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @param string|null $name Name of the sub-client (Default if null)
28 28
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
29 29
 	 */
30
-	public function getSubClient( $type, $name = null );
30
+	public function getSubClient($type, $name = null);
31 31
 
32 32
 	/**
33 33
 	 * Returns the HTML string for insertion into the header.
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
38 38
 	 * @return string|null String including HTML tags for the header on error
39 39
 	 */
40
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null );
40
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null);
41 41
 
42 42
 	/**
43 43
 	 * Returns the HTML code for insertion into the body.
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
48 48
 	 * @return string HTML code
49 49
 	 */
50
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null );
50
+	public function getBody($uid = '', array &$tags = array(), &$expire = null);
51 51
 
52 52
 	/**
53 53
 	 * Returns the view object that will generate the HTML output.
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
63 63
 	 * @return \Aimeos\Client\Html\Iface Reference to this object for fluent calls
64 64
 	 */
65
-	public function setView( \Aimeos\MW\View\Iface $view );
65
+	public function setView(\Aimeos\MW\View\Iface $view);
66 66
 
67 67
 	/**
68 68
 	 * Modifies the cached body content to replace content based on sessions or cookies.
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
72 72
 	 * @return string Modified body content
73 73
 	 */
74
-	public function modifyBody( $content, $uid );
74
+	public function modifyBody($content, $uid);
75 75
 
76 76
 	/**
77 77
 	 * Modifies the cached header content to replace content based on sessions or cookies.
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
81 81
 	 * @return string Modified header content
82 82
 	 */
83
-	public function modifyHeader( $content, $uid );
83
+	public function modifyHeader($content, $uid);
84 84
 
85 85
 	/**
86 86
 	 * Processes the input, e.g. store given values.
Please login to merge, or discard this patch.
client/html/src/Client/Html/Locale/Select/Currency/Standard.php 3 patches
Indentation   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -19,253 +19,253 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Standard
22
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
24 24
 {
25
-	/** client/html/locale/select/currency/standard/subparts
26
-	 * List of HTML sub-clients rendered within the locale select currency section
27
-	 *
28
-	 * The output of the frontend is composed of the code generated by the HTML
29
-	 * clients. Each HTML client can consist of serveral (or none) sub-clients
30
-	 * that are responsible for rendering certain sub-parts of the output. The
31
-	 * sub-clients can contain HTML clients themselves and therefore a
32
-	 * hierarchical tree of HTML clients is composed. Each HTML client creates
33
-	 * the output that is placed inside the container of its parent.
34
-	 *
35
-	 * At first, always the HTML code generated by the parent is printed, then
36
-	 * the HTML code of its sub-clients. The order of the HTML sub-clients
37
-	 * determines the order of the output of these sub-clients inside the parent
38
-	 * container. If the configured list of clients is
39
-	 *
40
-	 *  array( "subclient1", "subclient2" )
41
-	 *
42
-	 * you can easily change the order of the output by reordering the subparts:
43
-	 *
44
-	 *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
45
-	 *
46
-	 * You can also remove one or more parts if they shouldn't be rendered:
47
-	 *
48
-	 *  client/html/<clients>/subparts = array( "subclient1" )
49
-	 *
50
-	 * As the clients only generates structural HTML, the layout defined via CSS
51
-	 * should support adding, removing or reordering content by a fluid like
52
-	 * design.
53
-	 *
54
-	 * @param array List of sub-client names
55
-	 * @since 2014.09
56
-	 * @category Developer
57
-	 */
58
-	private $subPartPath = 'client/html/locale/select/currency/standard/subparts';
59
-	private $subPartNames = array();
25
+    /** client/html/locale/select/currency/standard/subparts
26
+     * List of HTML sub-clients rendered within the locale select currency section
27
+     *
28
+     * The output of the frontend is composed of the code generated by the HTML
29
+     * clients. Each HTML client can consist of serveral (or none) sub-clients
30
+     * that are responsible for rendering certain sub-parts of the output. The
31
+     * sub-clients can contain HTML clients themselves and therefore a
32
+     * hierarchical tree of HTML clients is composed. Each HTML client creates
33
+     * the output that is placed inside the container of its parent.
34
+     *
35
+     * At first, always the HTML code generated by the parent is printed, then
36
+     * the HTML code of its sub-clients. The order of the HTML sub-clients
37
+     * determines the order of the output of these sub-clients inside the parent
38
+     * container. If the configured list of clients is
39
+     *
40
+     *  array( "subclient1", "subclient2" )
41
+     *
42
+     * you can easily change the order of the output by reordering the subparts:
43
+     *
44
+     *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
45
+     *
46
+     * You can also remove one or more parts if they shouldn't be rendered:
47
+     *
48
+     *  client/html/<clients>/subparts = array( "subclient1" )
49
+     *
50
+     * As the clients only generates structural HTML, the layout defined via CSS
51
+     * should support adding, removing or reordering content by a fluid like
52
+     * design.
53
+     *
54
+     * @param array List of sub-client names
55
+     * @since 2014.09
56
+     * @category Developer
57
+     */
58
+    private $subPartPath = 'client/html/locale/select/currency/standard/subparts';
59
+    private $subPartNames = array();
60 60
 
61 61
 
62
-	/**
63
-	 * Returns the HTML code for insertion into the body.
64
-	 *
65
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
66
-	 * @param array &$tags Result array for the list of tags that are associated to the output
67
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68
-	 * @return string HTML code
69
-	 */
70
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
71
-	{
72
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
62
+    /**
63
+     * Returns the HTML code for insertion into the body.
64
+     *
65
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
66
+     * @param array &$tags Result array for the list of tags that are associated to the output
67
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68
+     * @return string HTML code
69
+     */
70
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
71
+    {
72
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
73 73
 
74
-		$html = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
-		}
78
-		$view->currencyBody = $html;
74
+        $html = '';
75
+        foreach( $this->getSubClients() as $subclient ) {
76
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
+        }
78
+        $view->currencyBody = $html;
79 79
 
80
-		/** client/html/locale/select/currency/standard/template-body
81
-		 * Relative path to the HTML body template of the locale select currency client.
82
-		 *
83
-		 * The template file contains the HTML code and processing instructions
84
-		 * to generate the result shown in the body of the frontend. The
85
-		 * configuration string is the path to the template file relative
86
-		 * to the templates directory (usually in client/html/templates).
87
-		 *
88
-		 * You can overwrite the template file configuration in extensions and
89
-		 * provide alternative templates. These alternative templates should be
90
-		 * named like the default one but with the string "standard" replaced by
91
-		 * an unique name. You may use the name of your project for this. If
92
-		 * you've implemented an alternative client class as well, "standard"
93
-		 * should be replaced by the name of the new class.
94
-		 *
95
-		 * @param string Relative path to the template creating code for the HTML page body
96
-		 * @since 2014.09
97
-		 * @category Developer
98
-		 * @see client/html/locale/select/currency/standard/template-header
99
-		 */
100
-		$tplconf = 'client/html/locale/select/currency/standard/template-body';
101
-		$default = 'locale/select/currency-body-default.php';
80
+        /** client/html/locale/select/currency/standard/template-body
81
+         * Relative path to the HTML body template of the locale select currency client.
82
+         *
83
+         * The template file contains the HTML code and processing instructions
84
+         * to generate the result shown in the body of the frontend. The
85
+         * configuration string is the path to the template file relative
86
+         * to the templates directory (usually in client/html/templates).
87
+         *
88
+         * You can overwrite the template file configuration in extensions and
89
+         * provide alternative templates. These alternative templates should be
90
+         * named like the default one but with the string "standard" replaced by
91
+         * an unique name. You may use the name of your project for this. If
92
+         * you've implemented an alternative client class as well, "standard"
93
+         * should be replaced by the name of the new class.
94
+         *
95
+         * @param string Relative path to the template creating code for the HTML page body
96
+         * @since 2014.09
97
+         * @category Developer
98
+         * @see client/html/locale/select/currency/standard/template-header
99
+         */
100
+        $tplconf = 'client/html/locale/select/currency/standard/template-body';
101
+        $default = 'locale/select/currency-body-default.php';
102 102
 
103
-		return $view->render( $view->config( $tplconf, $default ) );
104
-	}
103
+        return $view->render( $view->config( $tplconf, $default ) );
104
+    }
105 105
 
106 106
 
107
-	/**
108
-	 * Returns the HTML string for insertion into the header.
109
-	 *
110
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111
-	 * @param array &$tags Result array for the list of tags that are associated to the output
112
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
114
-	 */
115
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116
-	{
117
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
107
+    /**
108
+     * Returns the HTML string for insertion into the header.
109
+     *
110
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111
+     * @param array &$tags Result array for the list of tags that are associated to the output
112
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
+     * @return string|null String including HTML tags for the header on error
114
+     */
115
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116
+    {
117
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
118 118
 
119
-		$html = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
-		}
123
-		$view->currencyHeader = $html;
119
+        $html = '';
120
+        foreach( $this->getSubClients() as $subclient ) {
121
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
+        }
123
+        $view->currencyHeader = $html;
124 124
 
125
-		/** client/html/locale/select/currency/standard/template-header
126
-		 * Relative path to the HTML header template of the locale select currency client.
127
-		 *
128
-		 * The template file contains the HTML code and processing instructions
129
-		 * to generate the HTML code that is inserted into the HTML page header
130
-		 * of the rendered page in the frontend. The configuration string is the
131
-		 * path to the template file relative to the templates directory (usually
132
-		 * in client/html/templates).
133
-		 *
134
-		 * You can overwrite the template file configuration in extensions and
135
-		 * provide alternative templates. These alternative templates should be
136
-		 * named like the default one but with the string "standard" replaced by
137
-		 * an unique name. You may use the name of your project for this. If
138
-		 * you've implemented an alternative client class as well, "standard"
139
-		 * should be replaced by the name of the new class.
140
-		 *
141
-		 * @param string Relative path to the template creating code for the HTML page head
142
-		 * @since 2014.09
143
-		 * @category Developer
144
-		 * @see client/html/locale/select/currency/standard/template-body
145
-		 */
146
-		$tplconf = 'client/html/locale/select/currency/standard/template-header';
147
-		$default = 'locale/select/currency-header-default.php';
125
+        /** client/html/locale/select/currency/standard/template-header
126
+         * Relative path to the HTML header template of the locale select currency client.
127
+         *
128
+         * The template file contains the HTML code and processing instructions
129
+         * to generate the HTML code that is inserted into the HTML page header
130
+         * of the rendered page in the frontend. The configuration string is the
131
+         * path to the template file relative to the templates directory (usually
132
+         * in client/html/templates).
133
+         *
134
+         * You can overwrite the template file configuration in extensions and
135
+         * provide alternative templates. These alternative templates should be
136
+         * named like the default one but with the string "standard" replaced by
137
+         * an unique name. You may use the name of your project for this. If
138
+         * you've implemented an alternative client class as well, "standard"
139
+         * should be replaced by the name of the new class.
140
+         *
141
+         * @param string Relative path to the template creating code for the HTML page head
142
+         * @since 2014.09
143
+         * @category Developer
144
+         * @see client/html/locale/select/currency/standard/template-body
145
+         */
146
+        $tplconf = 'client/html/locale/select/currency/standard/template-header';
147
+        $default = 'locale/select/currency-header-default.php';
148 148
 
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151 151
 
152 152
 
153
-	/**
154
-	 * Returns the sub-client given by its name.
155
-	 *
156
-	 * @param string $type Name of the client type
157
-	 * @param string|null $name Name of the sub-client (Default if null)
158
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
159
-	 */
160
-	public function getSubClient( $type, $name = null )
161
-	{
162
-		/** client/html/locale/select/currency/decorators/excludes
163
-		 * Excludes decorators added by the "common" option from the locale select currency html client
164
-		 *
165
-		 * Decorators extend the functionality of a class by adding new aspects
166
-		 * (e.g. log what is currently done), executing the methods of the underlying
167
-		 * class only in certain conditions (e.g. only for logged in users) or
168
-		 * modify what is returned to the caller.
169
-		 *
170
-		 * This option allows you to remove a decorator added via
171
-		 * "client/html/common/decorators/default" before they are wrapped
172
-		 * around the html client.
173
-		 *
174
-		 *  client/html/locale/select/currency/decorators/excludes = array( 'decorator1' )
175
-		 *
176
-		 * This would remove the decorator named "decorator1" from the list of
177
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
178
-		 * "client/html/common/decorators/default" to the html client.
179
-		 *
180
-		 * @param array List of decorator names
181
-		 * @since 2015.08
182
-		 * @category Developer
183
-		 * @see client/html/common/decorators/default
184
-		 * @see client/html/locale/select/currency/decorators/global
185
-		 * @see client/html/locale/select/currency/decorators/local
186
-		 */
153
+    /**
154
+     * Returns the sub-client given by its name.
155
+     *
156
+     * @param string $type Name of the client type
157
+     * @param string|null $name Name of the sub-client (Default if null)
158
+     * @return \Aimeos\Client\Html\Iface Sub-client object
159
+     */
160
+    public function getSubClient( $type, $name = null )
161
+    {
162
+        /** client/html/locale/select/currency/decorators/excludes
163
+         * Excludes decorators added by the "common" option from the locale select currency html client
164
+         *
165
+         * Decorators extend the functionality of a class by adding new aspects
166
+         * (e.g. log what is currently done), executing the methods of the underlying
167
+         * class only in certain conditions (e.g. only for logged in users) or
168
+         * modify what is returned to the caller.
169
+         *
170
+         * This option allows you to remove a decorator added via
171
+         * "client/html/common/decorators/default" before they are wrapped
172
+         * around the html client.
173
+         *
174
+         *  client/html/locale/select/currency/decorators/excludes = array( 'decorator1' )
175
+         *
176
+         * This would remove the decorator named "decorator1" from the list of
177
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
178
+         * "client/html/common/decorators/default" to the html client.
179
+         *
180
+         * @param array List of decorator names
181
+         * @since 2015.08
182
+         * @category Developer
183
+         * @see client/html/common/decorators/default
184
+         * @see client/html/locale/select/currency/decorators/global
185
+         * @see client/html/locale/select/currency/decorators/local
186
+         */
187 187
 
188
-		/** client/html/locale/select/currency/decorators/global
189
-		 * Adds a list of globally available decorators only to the locale select currency html client
190
-		 *
191
-		 * Decorators extend the functionality of a class by adding new aspects
192
-		 * (e.g. log what is currently done), executing the methods of the underlying
193
-		 * class only in certain conditions (e.g. only for logged in users) or
194
-		 * modify what is returned to the caller.
195
-		 *
196
-		 * This option allows you to wrap global decorators
197
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
198
-		 *
199
-		 *  client/html/locale/select/currency/decorators/global = array( 'decorator1' )
200
-		 *
201
-		 * This would add the decorator named "decorator1" defined by
202
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
203
-		 *
204
-		 * @param array List of decorator names
205
-		 * @since 2015.08
206
-		 * @category Developer
207
-		 * @see client/html/common/decorators/default
208
-		 * @see client/html/locale/select/currency/decorators/excludes
209
-		 * @see client/html/locale/select/currency/decorators/local
210
-		 */
188
+        /** client/html/locale/select/currency/decorators/global
189
+         * Adds a list of globally available decorators only to the locale select currency html client
190
+         *
191
+         * Decorators extend the functionality of a class by adding new aspects
192
+         * (e.g. log what is currently done), executing the methods of the underlying
193
+         * class only in certain conditions (e.g. only for logged in users) or
194
+         * modify what is returned to the caller.
195
+         *
196
+         * This option allows you to wrap global decorators
197
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
198
+         *
199
+         *  client/html/locale/select/currency/decorators/global = array( 'decorator1' )
200
+         *
201
+         * This would add the decorator named "decorator1" defined by
202
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
203
+         *
204
+         * @param array List of decorator names
205
+         * @since 2015.08
206
+         * @category Developer
207
+         * @see client/html/common/decorators/default
208
+         * @see client/html/locale/select/currency/decorators/excludes
209
+         * @see client/html/locale/select/currency/decorators/local
210
+         */
211 211
 
212
-		/** client/html/locale/select/currency/decorators/local
213
-		 * Adds a list of local decorators only to the locale select currency html client
214
-		 *
215
-		 * Decorators extend the functionality of a class by adding new aspects
216
-		 * (e.g. log what is currently done), executing the methods of the underlying
217
-		 * class only in certain conditions (e.g. only for logged in users) or
218
-		 * modify what is returned to the caller.
219
-		 *
220
-		 * This option allows you to wrap local decorators
221
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
222
-		 *
223
-		 *  client/html/locale/select/currency/decorators/local = array( 'decorator2' )
224
-		 *
225
-		 * This would add the decorator named "decorator2" defined by
226
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
227
-		 *
228
-		 * @param array List of decorator names
229
-		 * @since 2015.08
230
-		 * @category Developer
231
-		 * @see client/html/common/decorators/default
232
-		 * @see client/html/locale/select/currency/decorators/excludes
233
-		 * @see client/html/locale/select/currency/decorators/global
234
-		 */
212
+        /** client/html/locale/select/currency/decorators/local
213
+         * Adds a list of local decorators only to the locale select currency html client
214
+         *
215
+         * Decorators extend the functionality of a class by adding new aspects
216
+         * (e.g. log what is currently done), executing the methods of the underlying
217
+         * class only in certain conditions (e.g. only for logged in users) or
218
+         * modify what is returned to the caller.
219
+         *
220
+         * This option allows you to wrap local decorators
221
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
222
+         *
223
+         *  client/html/locale/select/currency/decorators/local = array( 'decorator2' )
224
+         *
225
+         * This would add the decorator named "decorator2" defined by
226
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
227
+         *
228
+         * @param array List of decorator names
229
+         * @since 2015.08
230
+         * @category Developer
231
+         * @see client/html/common/decorators/default
232
+         * @see client/html/locale/select/currency/decorators/excludes
233
+         * @see client/html/locale/select/currency/decorators/global
234
+         */
235 235
 
236
-		return $this->createSubClient( 'locale/select/currency/' . $type, $name );
237
-	}
236
+        return $this->createSubClient( 'locale/select/currency/' . $type, $name );
237
+    }
238 238
 
239 239
 
240
-	/**
241
-	 * Processes the input, e.g. store given values.
242
-	 * A view must be available and this method doesn't generate any output
243
-	 * besides setting view variables.
244
-	 */
245
-	public function process()
246
-	{
247
-		$view = $this->getView();
248
-		$context = $this->getContext();
249
-		$config = $context->getConfig();
250
-		$session = $context->getSession();
240
+    /**
241
+     * Processes the input, e.g. store given values.
242
+     * A view must be available and this method doesn't generate any output
243
+     * besides setting view variables.
244
+     */
245
+    public function process()
246
+    {
247
+        $view = $this->getView();
248
+        $context = $this->getContext();
249
+        $config = $context->getConfig();
250
+        $session = $context->getSession();
251 251
 
252
-		$name = $config->get( 'client/html/locale/select/currency/param-name', 'loc_currencyid' );
252
+        $name = $config->get( 'client/html/locale/select/currency/param-name', 'loc_currencyid' );
253 253
 
254
-		if( ( $currencyId = $view->param( $name ) ) !== null ) {
255
-			$session->set( 'aimeos/locale/currencyId', $currencyId );
256
-		}
254
+        if( ( $currencyId = $view->param( $name ) ) !== null ) {
255
+            $session->set( 'aimeos/locale/currencyId', $currencyId );
256
+        }
257 257
 
258
-		parent::process();
259
-	}
258
+        parent::process();
259
+    }
260 260
 
261 261
 
262
-	/**
263
-	 * Returns the list of sub-client names configured for the client.
264
-	 *
265
-	 * @return array List of HTML client names
266
-	 */
267
-	protected function getSubClientNames()
268
-	{
269
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
270
-	}
262
+    /**
263
+     * Returns the list of sub-client names configured for the client.
264
+     *
265
+     * @return array List of HTML client names
266
+     */
267
+    protected function getSubClientNames()
268
+    {
269
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
270
+    }
271 271
 }
272 272
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68 68
 	 * @return string HTML code
69 69
 	 */
70
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
70
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
71 71
 	{
72
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
72
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
73 73
 
74 74
 		$html = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
75
+		foreach ($this->getSubClients() as $subclient) {
76
+			$html .= $subclient->setView($view)->getBody($uid, $tags, $expire);
77 77
 		}
78 78
 		$view->currencyBody = $html;
79 79
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$tplconf = 'client/html/locale/select/currency/standard/template-body';
101 101
 		$default = 'locale/select/currency-body-default.php';
102 102
 
103
-		return $view->render( $view->config( $tplconf, $default ) );
103
+		return $view->render($view->config($tplconf, $default));
104 104
 	}
105 105
 
106 106
 
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113 113
 	 * @return string|null String including HTML tags for the header on error
114 114
 	 */
115
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
115
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
116 116
 	{
117
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
117
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
118 118
 
119 119
 		$html = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
120
+		foreach ($this->getSubClients() as $subclient) {
121
+			$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
122 122
 		}
123 123
 		$view->currencyHeader = $html;
124 124
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$tplconf = 'client/html/locale/select/currency/standard/template-header';
147 147
 		$default = 'locale/select/currency-header-default.php';
148 148
 
149
-		return $view->render( $view->config( $tplconf, $default ) );
149
+		return $view->render($view->config($tplconf, $default));
150 150
 	}
151 151
 
152 152
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * @param string|null $name Name of the sub-client (Default if null)
158 158
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
159 159
 	 */
160
-	public function getSubClient( $type, $name = null )
160
+	public function getSubClient($type, $name = null)
161 161
 	{
162 162
 		/** client/html/locale/select/currency/decorators/excludes
163 163
 		 * Excludes decorators added by the "common" option from the locale select currency html client
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		 * @see client/html/locale/select/currency/decorators/global
234 234
 		 */
235 235
 
236
-		return $this->createSubClient( 'locale/select/currency/' . $type, $name );
236
+		return $this->createSubClient('locale/select/currency/'.$type, $name);
237 237
 	}
238 238
 
239 239
 
@@ -249,10 +249,10 @@  discard block
 block discarded – undo
249 249
 		$config = $context->getConfig();
250 250
 		$session = $context->getSession();
251 251
 
252
-		$name = $config->get( 'client/html/locale/select/currency/param-name', 'loc_currencyid' );
252
+		$name = $config->get('client/html/locale/select/currency/param-name', 'loc_currencyid');
253 253
 
254
-		if( ( $currencyId = $view->param( $name ) ) !== null ) {
255
-			$session->set( 'aimeos/locale/currencyId', $currencyId );
254
+		if (($currencyId = $view->param($name)) !== null) {
255
+			$session->set('aimeos/locale/currencyId', $currencyId);
256 256
 		}
257 257
 
258 258
 		parent::process();
@@ -266,6 +266,6 @@  discard block
 block discarded – undo
266 266
 	 */
267 267
 	protected function getSubClientNames()
268 268
 	{
269
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
269
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
270 270
 	}
271 271
 }
272 272
\ No newline at end of file
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111 111
 	 * @param array &$tags Result array for the list of tags that are associated to the output
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
113
+	 * @return string String including HTML tags for the header on error
114 114
 	 */
115 115
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116 116
 	{
Please login to merge, or discard this patch.