@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * AbstractSanitizer |
|
4 | - * |
|
5 | - * @package brightnucleus/chainmail |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * AbstractSanitizer |
|
4 | + * |
|
5 | + * @package brightnucleus/chainmail |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\ChainMail\Sanitizer; |
13 | 13 |
@@ -22,17 +22,17 @@ |
||
22 | 22 | class HTMLSanitizer extends AbstractSanitizer |
23 | 23 | { |
24 | 24 | |
25 | - /** |
|
26 | - * Sanitize the content for a given context. |
|
27 | - * |
|
28 | - * @since 1.0.0 |
|
29 | - * |
|
30 | - * @param string $content Content to sanitize. |
|
31 | - * @param array $context Context in which to sanitize. |
|
32 | - * @return string Sanitized content. |
|
33 | - */ |
|
34 | - public function sanitize($content, array $context) |
|
35 | - { |
|
36 | - return $content; |
|
37 | - } |
|
25 | + /** |
|
26 | + * Sanitize the content for a given context. |
|
27 | + * |
|
28 | + * @since 1.0.0 |
|
29 | + * |
|
30 | + * @param string $content Content to sanitize. |
|
31 | + * @param array $context Context in which to sanitize. |
|
32 | + * @return string Sanitized content. |
|
33 | + */ |
|
34 | + public function sanitize($content, array $context) |
|
35 | + { |
|
36 | + return $content; |
|
37 | + } |
|
38 | 38 | } |
39 | 39 | \ No newline at end of file |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * TextSanitizer |
|
4 | - * |
|
5 | - * @package brightnucleus/chainmail |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * TextSanitizer |
|
4 | + * |
|
5 | + * @package brightnucleus/chainmail |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\ChainMail\Sanitizer; |
13 | 13 | |
@@ -22,17 +22,17 @@ discard block |
||
22 | 22 | class TextSanitizer extends AbstractSanitizer |
23 | 23 | { |
24 | 24 | |
25 | - /** |
|
26 | - * Sanitize the content for a given context. |
|
27 | - * |
|
28 | - * @since 1.0.0 |
|
29 | - * |
|
30 | - * @param string $content Content to sanitize. |
|
31 | - * @param array $context Context in which to sanitize. |
|
32 | - * @return string Sanitized content. |
|
33 | - */ |
|
34 | - public function sanitize($content, array $context) |
|
35 | - { |
|
36 | - return $content; |
|
37 | - } |
|
25 | + /** |
|
26 | + * Sanitize the content for a given context. |
|
27 | + * |
|
28 | + * @since 1.0.0 |
|
29 | + * |
|
30 | + * @param string $content Content to sanitize. |
|
31 | + * @param array $context Context in which to sanitize. |
|
32 | + * @return string Sanitized content. |
|
33 | + */ |
|
34 | + public function sanitize($content, array $context) |
|
35 | + { |
|
36 | + return $content; |
|
37 | + } |
|
38 | 38 | } |
39 | 39 | \ No newline at end of file |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * SanitizerInterface |
|
4 | - * |
|
5 | - * @package brightnucleus/chainmail |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * SanitizerInterface |
|
4 | + * |
|
5 | + * @package brightnucleus/chainmail |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\ChainMail; |
13 | 13 | |
@@ -22,14 +22,14 @@ discard block |
||
22 | 22 | interface SanitizerInterface |
23 | 23 | { |
24 | 24 | |
25 | - /** |
|
26 | - * Sanitize content for a given context. |
|
27 | - * |
|
28 | - * @since 1.0.0 |
|
29 | - * |
|
30 | - * @param string $content Content to sanitize. |
|
31 | - * @param array $context Context in which to sanitize. |
|
32 | - * @return string Sanitized content. |
|
33 | - */ |
|
34 | - public function sanitize($content, array $context); |
|
25 | + /** |
|
26 | + * Sanitize content for a given context. |
|
27 | + * |
|
28 | + * @since 1.0.0 |
|
29 | + * |
|
30 | + * @param string $content Content to sanitize. |
|
31 | + * @param array $context Context in which to sanitize. |
|
32 | + * @return string Sanitized content. |
|
33 | + */ |
|
34 | + public function sanitize($content, array $context); |
|
35 | 35 | } |
36 | 36 | \ No newline at end of file |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * GenericSection |
|
4 | - * |
|
5 | - * @package brightnucleus/chainmail |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * GenericSection |
|
4 | + * |
|
5 | + * @package brightnucleus/chainmail |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\ChainMail\Section; |
13 | 13 |
@@ -22,12 +22,12 @@ |
||
22 | 22 | interface SectionInterface extends Renderable |
23 | 23 | { |
24 | 24 | |
25 | - /** |
|
26 | - * Get the name of the Section. |
|
27 | - * |
|
28 | - * @since 1.0.0 |
|
29 | - * |
|
30 | - * @return string Name of the section. |
|
31 | - */ |
|
32 | - public function getSectionName(); |
|
25 | + /** |
|
26 | + * Get the name of the Section. |
|
27 | + * |
|
28 | + * @since 1.0.0 |
|
29 | + * |
|
30 | + * @return string Name of the section. |
|
31 | + */ |
|
32 | + public function getSectionName(); |
|
33 | 33 | } |
34 | 34 | \ No newline at end of file |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Config |
|
4 | - * |
|
5 | - * @package brightnucleus/chainmail |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * Config |
|
4 | + * |
|
5 | + * @package brightnucleus/chainmail |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\ChainMail\Support; |
13 | 13 | |
@@ -24,75 +24,75 @@ discard block |
||
24 | 24 | class Config extends ArrayObject implements ConfigInterface |
25 | 25 | { |
26 | 26 | |
27 | - /** |
|
28 | - * Instantiate the Config object. |
|
29 | - * |
|
30 | - * @since 1.0.0 |
|
31 | - * |
|
32 | - * @param array $config Array with settings. |
|
33 | - */ |
|
34 | - public function __construct(array $config) |
|
35 | - { |
|
36 | - // Make sure the config entries can be accessed as properties. |
|
37 | - parent::__construct($config, ArrayObject::ARRAY_AS_PROPS); |
|
38 | - } |
|
27 | + /** |
|
28 | + * Instantiate the Config object. |
|
29 | + * |
|
30 | + * @since 1.0.0 |
|
31 | + * |
|
32 | + * @param array $config Array with settings. |
|
33 | + */ |
|
34 | + public function __construct(array $config) |
|
35 | + { |
|
36 | + // Make sure the config entries can be accessed as properties. |
|
37 | + parent::__construct($config, ArrayObject::ARRAY_AS_PROPS); |
|
38 | + } |
|
39 | 39 | |
40 | - /** |
|
41 | - * Magic method that enables the use of normal array_* functions on the |
|
42 | - * Config object. |
|
43 | - * |
|
44 | - * @since 1.0.0 |
|
45 | - * |
|
46 | - * @param string $function The function that was called on this object. |
|
47 | - * @param mixed $arguments The arguments that were used for the function |
|
48 | - * call. |
|
49 | - * @return mixed |
|
50 | - * @throws BadMethodCallException |
|
51 | - */ |
|
52 | - public function __call($function, $arguments) |
|
53 | - { |
|
54 | - if ( ! is_callable($function) || substr($function, 0, 6) !== 'array_') { |
|
55 | - throw new BadMethodCallException(__CLASS__ . '->' . $function); |
|
56 | - } |
|
40 | + /** |
|
41 | + * Magic method that enables the use of normal array_* functions on the |
|
42 | + * Config object. |
|
43 | + * |
|
44 | + * @since 1.0.0 |
|
45 | + * |
|
46 | + * @param string $function The function that was called on this object. |
|
47 | + * @param mixed $arguments The arguments that were used for the function |
|
48 | + * call. |
|
49 | + * @return mixed |
|
50 | + * @throws BadMethodCallException |
|
51 | + */ |
|
52 | + public function __call($function, $arguments) |
|
53 | + { |
|
54 | + if ( ! is_callable($function) || substr($function, 0, 6) !== 'array_') { |
|
55 | + throw new BadMethodCallException(__CLASS__ . '->' . $function); |
|
56 | + } |
|
57 | 57 | |
58 | - return call_user_func_array($function, |
|
59 | - array_merge(array($this->getArrayCopy()), $arguments)); |
|
60 | - } |
|
58 | + return call_user_func_array($function, |
|
59 | + array_merge(array($this->getArrayCopy()), $arguments)); |
|
60 | + } |
|
61 | 61 | |
62 | - /** |
|
63 | - * Check whether the Config has a specific key. |
|
64 | - * |
|
65 | - * @since 1.0.0 |
|
66 | - * |
|
67 | - * @param string $key The key to check the existence for. |
|
68 | - * @return bool |
|
69 | - */ |
|
70 | - public function hasKey($key) |
|
71 | - { |
|
72 | - return array_key_exists($key, (array)$this); |
|
73 | - } |
|
62 | + /** |
|
63 | + * Check whether the Config has a specific key. |
|
64 | + * |
|
65 | + * @since 1.0.0 |
|
66 | + * |
|
67 | + * @param string $key The key to check the existence for. |
|
68 | + * @return bool |
|
69 | + */ |
|
70 | + public function hasKey($key) |
|
71 | + { |
|
72 | + return array_key_exists($key, (array)$this); |
|
73 | + } |
|
74 | 74 | |
75 | - /** |
|
76 | - * Get the value of a specific key. |
|
77 | - * |
|
78 | - * @since 1.0.0 |
|
79 | - * |
|
80 | - * @param string $key The key to get the value for. |
|
81 | - * @return mixed |
|
82 | - */ |
|
83 | - public function getKey($key) |
|
84 | - { |
|
85 | - return $this[$key]; |
|
86 | - } |
|
75 | + /** |
|
76 | + * Get the value of a specific key. |
|
77 | + * |
|
78 | + * @since 1.0.0 |
|
79 | + * |
|
80 | + * @param string $key The key to get the value for. |
|
81 | + * @return mixed |
|
82 | + */ |
|
83 | + public function getKey($key) |
|
84 | + { |
|
85 | + return $this[$key]; |
|
86 | + } |
|
87 | 87 | |
88 | - /** |
|
89 | - * Get the an array with all the keys |
|
90 | - * |
|
91 | - * @since 1.0.0 |
|
92 | - * @return mixed |
|
93 | - */ |
|
94 | - public function getKeys() |
|
95 | - { |
|
96 | - return array_keys((array)$this); |
|
97 | - } |
|
88 | + /** |
|
89 | + * Get the an array with all the keys |
|
90 | + * |
|
91 | + * @since 1.0.0 |
|
92 | + * @return mixed |
|
93 | + */ |
|
94 | + public function getKeys() |
|
95 | + { |
|
96 | + return array_keys((array)$this); |
|
97 | + } |
|
98 | 98 | } |
99 | 99 | \ No newline at end of file |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | public function __call($function, $arguments) |
53 | 53 | { |
54 | 54 | if ( ! is_callable($function) || substr($function, 0, 6) !== 'array_') { |
55 | - throw new BadMethodCallException(__CLASS__ . '->' . $function); |
|
55 | + throw new BadMethodCallException(__CLASS__.'->'.$function); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | return call_user_func_array($function, |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function hasKey($key) |
71 | 71 | { |
72 | - return array_key_exists($key, (array)$this); |
|
72 | + return array_key_exists($key, (array) $this); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -93,6 +93,6 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function getKeys() |
95 | 95 | { |
96 | - return array_keys((array)$this); |
|
96 | + return array_keys((array) $this); |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | \ No newline at end of file |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * ConfigInterface |
|
4 | - * |
|
5 | - * @package brightnucleus/chainmail |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * ConfigInterface |
|
4 | + * |
|
5 | + * @package brightnucleus/chainmail |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\ChainMail\Support; |
13 | 13 | |
@@ -23,47 +23,47 @@ discard block |
||
23 | 23 | interface ConfigInterface extends ArrayAccess |
24 | 24 | { |
25 | 25 | |
26 | - /** |
|
27 | - * Creates a copy of the ArrayObject. |
|
28 | - * |
|
29 | - * Returns a copy of the array. When the ArrayObject refers to an object an |
|
30 | - * array of the public properties of that object will be returned. |
|
31 | - * This is implemented by \ArrayObject. |
|
32 | - * |
|
33 | - * @since 1.0.0 |
|
34 | - * |
|
35 | - * @return array Copy of the array. |
|
36 | - */ |
|
37 | - public function getArrayCopy(); |
|
26 | + /** |
|
27 | + * Creates a copy of the ArrayObject. |
|
28 | + * |
|
29 | + * Returns a copy of the array. When the ArrayObject refers to an object an |
|
30 | + * array of the public properties of that object will be returned. |
|
31 | + * This is implemented by \ArrayObject. |
|
32 | + * |
|
33 | + * @since 1.0.0 |
|
34 | + * |
|
35 | + * @return array Copy of the array. |
|
36 | + */ |
|
37 | + public function getArrayCopy(); |
|
38 | 38 | |
39 | - /** |
|
40 | - * Check whether the Config has a specific key. |
|
41 | - * |
|
42 | - * @since 1.0.0 |
|
43 | - * |
|
44 | - * @param string $key The key to check the existence for. |
|
45 | - * |
|
46 | - * @return bool |
|
47 | - */ |
|
48 | - public function hasKey($key); |
|
39 | + /** |
|
40 | + * Check whether the Config has a specific key. |
|
41 | + * |
|
42 | + * @since 1.0.0 |
|
43 | + * |
|
44 | + * @param string $key The key to check the existence for. |
|
45 | + * |
|
46 | + * @return bool |
|
47 | + */ |
|
48 | + public function hasKey($key); |
|
49 | 49 | |
50 | - /** |
|
51 | - * Get the value of a specific key. |
|
52 | - * |
|
53 | - * @since 1.0.0 |
|
54 | - * |
|
55 | - * @param string $key The key to get the value for. |
|
56 | - * |
|
57 | - * @return mixed |
|
58 | - */ |
|
59 | - public function getKey($key); |
|
50 | + /** |
|
51 | + * Get the value of a specific key. |
|
52 | + * |
|
53 | + * @since 1.0.0 |
|
54 | + * |
|
55 | + * @param string $key The key to get the value for. |
|
56 | + * |
|
57 | + * @return mixed |
|
58 | + */ |
|
59 | + public function getKey($key); |
|
60 | 60 | |
61 | - /** |
|
62 | - * Get the an array with all the keys |
|
63 | - * |
|
64 | - * @since 1.0.0 |
|
65 | - * |
|
66 | - * @return mixed |
|
67 | - */ |
|
68 | - public function getKeys(); |
|
61 | + /** |
|
62 | + * Get the an array with all the keys |
|
63 | + * |
|
64 | + * @since 1.0.0 |
|
65 | + * |
|
66 | + * @return mixed |
|
67 | + */ |
|
68 | + public function getKeys(); |
|
69 | 69 | } |
70 | 70 | \ No newline at end of file |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Factory |
|
4 | - * |
|
5 | - * @package brightnucleus/chainmail |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * Factory |
|
4 | + * |
|
5 | + * @package brightnucleus/chainmail |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\ChainMail\Support; |
13 | 13 | |
@@ -24,74 +24,74 @@ discard block |
||
24 | 24 | class Factory |
25 | 25 | { |
26 | 26 | |
27 | - /** |
|
28 | - * Configuration Settings. |
|
29 | - * |
|
30 | - * @since 1.0.0 |
|
31 | - * |
|
32 | - * @var ConfigInterface |
|
33 | - */ |
|
34 | - protected $config; |
|
27 | + /** |
|
28 | + * Configuration Settings. |
|
29 | + * |
|
30 | + * @since 1.0.0 |
|
31 | + * |
|
32 | + * @var ConfigInterface |
|
33 | + */ |
|
34 | + protected $config; |
|
35 | 35 | |
36 | - /** |
|
37 | - * Type of element the factory wants to create. |
|
38 | - * |
|
39 | - * @since 1.0.0 |
|
40 | - * |
|
41 | - * @var string |
|
42 | - */ |
|
43 | - protected $element; |
|
36 | + /** |
|
37 | + * Type of element the factory wants to create. |
|
38 | + * |
|
39 | + * @since 1.0.0 |
|
40 | + * |
|
41 | + * @var string |
|
42 | + */ |
|
43 | + protected $element; |
|
44 | 44 | |
45 | - /** |
|
46 | - * Instantiate a Factory object. |
|
47 | - * |
|
48 | - * @since 1.0.0 |
|
49 | - * |
|
50 | - * @param ConfigInterface $config Configuration settings. |
|
51 | - * @param string $element The type of element to instantiate a |
|
52 | - * factory for. |
|
53 | - * @throws RuntimeException When an unknown element type is requested. |
|
54 | - */ |
|
55 | - public function __construct(ConfigInterface $config, $element) |
|
56 | - { |
|
45 | + /** |
|
46 | + * Instantiate a Factory object. |
|
47 | + * |
|
48 | + * @since 1.0.0 |
|
49 | + * |
|
50 | + * @param ConfigInterface $config Configuration settings. |
|
51 | + * @param string $element The type of element to instantiate a |
|
52 | + * factory for. |
|
53 | + * @throws RuntimeException When an unknown element type is requested. |
|
54 | + */ |
|
55 | + public function __construct(ConfigInterface $config, $element) |
|
56 | + { |
|
57 | 57 | |
58 | - $this->config = $config; |
|
58 | + $this->config = $config; |
|
59 | 59 | |
60 | - if ( ! $this->config->hasKey($element)) { |
|
61 | - throw new RuntimeException(sprintf( |
|
62 | - 'Could not instantiate Factory for unknown Element Type "%1$s".', |
|
63 | - $element |
|
64 | - )); |
|
65 | - } |
|
60 | + if ( ! $this->config->hasKey($element)) { |
|
61 | + throw new RuntimeException(sprintf( |
|
62 | + 'Could not instantiate Factory for unknown Element Type "%1$s".', |
|
63 | + $element |
|
64 | + )); |
|
65 | + } |
|
66 | 66 | |
67 | - $this->element = $element; |
|
68 | - } |
|
67 | + $this->element = $element; |
|
68 | + } |
|
69 | 69 | |
70 | - /** |
|
71 | - * Create and return a new instance of an element. |
|
72 | - * |
|
73 | - * @since 1.0.0 |
|
74 | - * |
|
75 | - * @param string $type Type of element to create. |
|
76 | - * @param mixed $arguments Optional. Arguments to pass to the object. |
|
77 | - * @return mixed |
|
78 | - * @throws RuntimeException If an unknown element type is requested. |
|
79 | - */ |
|
80 | - public function create($type, $arguments = null) |
|
81 | - { |
|
70 | + /** |
|
71 | + * Create and return a new instance of an element. |
|
72 | + * |
|
73 | + * @since 1.0.0 |
|
74 | + * |
|
75 | + * @param string $type Type of element to create. |
|
76 | + * @param mixed $arguments Optional. Arguments to pass to the object. |
|
77 | + * @return mixed |
|
78 | + * @throws RuntimeException If an unknown element type is requested. |
|
79 | + */ |
|
80 | + public function create($type, $arguments = null) |
|
81 | + { |
|
82 | 82 | |
83 | - $classMap = $this->config[$this->element]; |
|
83 | + $classMap = $this->config[$this->element]; |
|
84 | 84 | |
85 | - if ( ! array_key_exists($type, $classMap)) { |
|
86 | - throw new RuntimeException(sprintf( |
|
87 | - 'Could not create object, unknown Type "%1$s" for "%2$s" elements.', |
|
88 | - $type, |
|
89 | - $this->element |
|
90 | - )); |
|
91 | - } |
|
85 | + if ( ! array_key_exists($type, $classMap)) { |
|
86 | + throw new RuntimeException(sprintf( |
|
87 | + 'Could not create object, unknown Type "%1$s" for "%2$s" elements.', |
|
88 | + $type, |
|
89 | + $this->element |
|
90 | + )); |
|
91 | + } |
|
92 | 92 | |
93 | - $className = $classMap[$type]['class_name']; |
|
93 | + $className = $classMap[$type]['class_name']; |
|
94 | 94 | |
95 | - return new $className($this->config, $arguments); |
|
96 | - } |
|
95 | + return new $className($this->config, $arguments); |
|
96 | + } |
|
97 | 97 | } |