Completed
Push — master ( b465d4...6e3264 )
by Jean-Christophe
03:19
created
Ajax/bootstrap/html/HtmlAlert.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,13 +44,13 @@  discard block
 block discarded – undo
44 44
 
45 45
 	public function addCloseButton() {
46 46
 		$button=new HtmlButton("close-".$this->identifier);
47
-		$button->setProperties(array (
47
+		$button->setProperties(array(
48 48
 				"class" => "close",
49 49
 				"data-dismiss" => "alert",
50 50
 				"aria-label" => "close"
51 51
 		));
52 52
 		$button->setValue('<span aria-hidden="true">&times;</span>');
53
-		$this->addToPropertyCtrl("class", "alert-dismissible", array (
53
+		$this->addToPropertyCtrl("class", "alert-dismissible", array(
54 54
 				"alert-dismissible"
55 55
 		));
56 56
 		$this->button=$button;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::compile()
80 80
 	 */
81 81
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
82
-		if ($this->closeable&&$this->button==="") {
82
+		if ($this->closeable && $this->button==="") {
83 83
 			$this->addCloseButton();
84 84
 		}
85 85
 		return parent::compile($js, $view);
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlBreadcrumbs.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -42,16 +42,16 @@  discard block
 block discarded – undo
42 42
 	 * @param boolean $autoActive sets the last element's class to <b>active</b> if true
43 43
 	 * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()}
44 44
 	 */
45
-	public function __construct($identifier,$elements=array(),$autoActive=true,$hrefFunction=NULL){
46
-		parent::__construct($identifier,"ol");
45
+	public function __construct($identifier, $elements=array(), $autoActive=true, $hrefFunction=NULL) {
46
+		parent::__construct($identifier, "ol");
47 47
 		$this->setProperty("class", "breadcrumb");
48 48
 		$this->content=array();
49 49
 		$this->autoActive=$autoActive;
50 50
 		$this->root="";
51 51
 		$this->attr="data-ajax";
52 52
 		$this->absolutePaths;
53
-		$this->_hrefFunction=function ($e){return $e->getContent();};
54
-		if(isset($hrefFunction)){
53
+		$this->_hrefFunction=function($e) {return $e->getContent(); };
54
+		if (isset($hrefFunction)) {
55 55
 			$this->_hrefFunction=$hrefFunction;
56 56
 		}
57 57
 		$this->addElements($elements);
@@ -62,43 +62,43 @@  discard block
 block discarded – undo
62 62
 	 * @param string $href
63 63
 	 * @return \Ajax\bootstrap\html\HtmlLink
64 64
 	 */
65
-	public function addElement($element,$href="",$glyph=NULL){
65
+	public function addElement($element, $href="", $glyph=NULL) {
66 66
 		$size=sizeof($this->content);
67
-		if(is_array($element)){
67
+		if (is_array($element)) {
68 68
 			$elm=new HtmlLink("lnk-".$this->identifier."-".$size);
69 69
 			$elm->fromArray($element);
70
-		}else if($element instanceof HtmlLink){
70
+		}else if ($element instanceof HtmlLink) {
71 71
 			$elm=$element;
72
-		}else{
73
-			$elm=new HtmlLink("lnk-".$this->identifier."-".$size,$href,$element);
74
-			if(isset($glyph)){
72
+		}else {
73
+			$elm=new HtmlLink("lnk-".$this->identifier."-".$size, $href, $element);
74
+			if (isset($glyph)) {
75 75
 				$elm->wrapContentWithGlyph($glyph);
76 76
 			}
77 77
 		}
78
-		$elm->wrap("<li>","</li>");
78
+		$elm->wrap("<li>", "</li>");
79 79
 		$this->content[]=$elm;
80 80
 		$elm->setProperty($this->attr, $this->getHref($size));
81 81
 		return $elm;
82 82
 	}
83 83
 	
84
-	public function setActive($index=null){
85
-		if(!isset($index)){
84
+	public function setActive($index=null) {
85
+		if (!isset($index)) {
86 86
 			$index=sizeof($this->content)-1;
87 87
 		}
88
-		$li=new HtmlDoubleElement("","li");
88
+		$li=new HtmlDoubleElement("", "li");
89 89
 		$li->setClass("active");
90 90
 		$li->setContent($this->content[$index]->getContent());
91 91
 		$this->content[$index]=$li;
92 92
 	}
93 93
 	
94
-	public function addElements($elements){
95
-		foreach ( $elements as $element ) {
94
+	public function addElements($elements) {
95
+		foreach ($elements as $element) {
96 96
 			$this->addElement($element);
97 97
 		}
98 98
 		return $this;
99 99
 	}
100 100
 	
101
-	public function fromArray($array){
101
+	public function fromArray($array) {
102 102
 		$array=parent::fromArray($array);
103 103
 		$this->addElements($array);
104 104
 		return $array;
@@ -110,14 +110,14 @@  discard block
 block discarded – undo
110 110
 	 * @param string $separator
111 111
 	 * @return string
112 112
 	 */
113
-	public function getHref($index=null,$separator="/"){
114
-		if(!isset($index)){
113
+	public function getHref($index=null, $separator="/") {
114
+		if (!isset($index)) {
115 115
 			$index=sizeof($this->content);
116 116
 		}
117
-		if($this->absolutePaths===true){
117
+		if ($this->absolutePaths===true) {
118 118
 			return $this->_hrefFunction($this->content[$index]);
119
-		}else{
120
-			return $this->root.implode($separator, array_slice(array_map(function($e){return $this->_hrefFunction($e);}, $this->content),0,$index+1));
119
+		}else {
120
+			return $this->root.implode($separator, array_slice(array_map(function($e) {return $this->_hrefFunction($e); }, $this->content), 0, $index+1));
121 121
 		}
122 122
 	}
123 123
 	
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 * @see \Ajax\bootstrap\html\BaseHtml::compile()
127 127
 	 */
128 128
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
129
-		if($this->autoActive){
129
+		if ($this->autoActive) {
130 130
 			$this->setActive();
131 131
 		}
132 132
 		return parent::compile($js, $view);
@@ -144,14 +144,14 @@  discard block
 block discarded – undo
144 144
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
145 145
 	 */
146 146
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
147
-		foreach ($this->content as $element){
148
-			$element->on($event,$jsCode,$stopPropagation,$preventDefault);
147
+		foreach ($this->content as $element) {
148
+			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
149 149
 		}
150 150
 		return $this;
151 151
 	}
152 152
 	
153 153
 	public function setAutoActive($autoActive) {
154
-		$this->autoActive = $autoActive;
154
+		$this->autoActive=$autoActive;
155 155
 		return $this;
156 156
 	}
157 157
 	
@@ -160,12 +160,12 @@  discard block
 block discarded – undo
160 160
 	}
161 161
 	
162 162
 	public function setRoot($root) {
163
-		$this->root = $root;
163
+		$this->root=$root;
164 164
 		return $this;
165 165
 	}
166 166
 	
167 167
 	public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) {
168
-		foreach ($this->content as $element){
168
+		foreach ($this->content as $element) {
169 169
 			$element->_ajaxOn($operation, $event, $url, $responseElement, $parameters);
170 170
 		}
171 171
 		return $this;
@@ -178,12 +178,12 @@  discard block
 block discarded – undo
178 178
 	 * @param string $attr the html attribute used to build the elements url 
179 179
 	 * @return HtmlBreadcrumbs
180 180
 	 */
181
-	public function autoGetOnClick($targetSelector){
182
-		return $this->getOnClick($this->root, $targetSelector,array("attr"=>$this->attr));
181
+	public function autoGetOnClick($targetSelector) {
182
+		return $this->getOnClick($this->root, $targetSelector, array("attr"=>$this->attr));
183 183
 	}
184 184
 	
185
-	public function contentAsString(){
186
-		if($this->autoActive){
185
+	public function contentAsString() {
186
+		if ($this->autoActive) {
187 187
 			$this->setActive();
188 188
 		}	
189 189
 		return implode("", $this->content);
@@ -193,11 +193,11 @@  discard block
 block discarded – undo
193 193
 	 * Generate the jquery script to set the elements to the breadcrumbs
194 194
 	 * @param JsUtils $jsUtils
195 195
 	 */
196
-	public function jsSetContent(JsUtils $jsUtils){
197
-		$jsUtils->html("#".$this->identifier,str_replace("\"","'", $this->contentAsString()),true);
196
+	public function jsSetContent(JsUtils $jsUtils) {
197
+		$jsUtils->html("#".$this->identifier, str_replace("\"", "'", $this->contentAsString()), true);
198 198
 	}
199 199
 	
200
-	public function getElement($index){
200
+	public function getElement($index) {
201 201
 		return $this->content[$index];
202 202
 	}
203 203
 	
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	 * @param mixed $glyph
207 207
 	 * @param int $index
208 208
 	 */
209
-	public function addGlyph($glyph,$index){
209
+	public function addGlyph($glyph, $index) {
210 210
 		$elm=$this->getElement($index);
211 211
 		return $elm->wrapContentWithGlyph($glyph);
212 212
 	}
@@ -216,14 +216,14 @@  discard block
 block discarded – undo
216 216
 	 * @param Dispatcher $dispatcher the request dispatcher
217 217
 	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
218 218
 	 */
219
-	public function setDispatcher($dispatcher){
220
-		$items=array($dispatcher->getControllerName(),$dispatcher->getActionName());
221
-		$items=array_merge($items,$dispatcher->getParams());
219
+	public function setDispatcher($dispatcher) {
220
+		$items=array($dispatcher->getControllerName(), $dispatcher->getActionName());
221
+		$items=array_merge($items, $dispatcher->getParams());
222 222
 		return $this->addElements($items);
223 223
 	}
224 224
 	
225 225
 	public function __call($method, $args) {
226
-		if(isset($this->$method) && is_callable($this->$method)) {
226
+		if (isset($this->$method) && is_callable($this->$method)) {
227 227
 			return call_user_func_array(
228 228
 					$this->$method,
229 229
 					$args
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
238 238
 	 */
239 239
 	public function setHrefFunction($_hrefFunction) {
240
-		$this->_hrefFunction = $_hrefFunction;
240
+		$this->_hrefFunction=$_hrefFunction;
241 241
 		return $this;
242 242
 	}
243 243
 	
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
248 248
 	 */
249 249
 	public function setAttr($attr) {
250
-		$this->attr = $attr;
250
+		$this->attr=$attr;
251 251
 		return $this;
252 252
 	}
253 253
 	
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlButton.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 * @return \Ajax\bootstrap\html\HtmlButton
72 72
 	 */
73 73
 	public function setActive() {
74
-		return $this->addToPropertyCtrl("class", "active", array (
74
+		return $this->addToPropertyCtrl("class", "active", array(
75 75
 				"active"
76 76
 		));
77 77
 	}
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	 * @return \Ajax\bootstrap\html\HtmlButton
82 82
 	 */
83 83
 	public function setDisabled() {
84
-		return $this->addToPropertyCtrl("class", "disabled", array (
84
+		return $this->addToPropertyCtrl("class", "disabled", array(
85 85
 				"disabled"
86 86
 		));
87 87
 	}
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	public function fromArray($array) {
111 111
 		$array=parent::fromArray($array);
112
-		foreach ( $array as $key => $value ) {
112
+		foreach ($array as $key => $value) {
113 113
 			$this->setProperty($key, $value);
114 114
 		}
115 115
 		return $array;
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlButtongroups.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 * @return HtmlButtongroups default : ""
35 35
 	 */
36 36
 	public function setSize($size) {
37
-		foreach ( $this->elements as $element ) {
37
+		foreach ($this->elements as $element) {
38 38
 			$element->setSize($size);
39 39
 		}
40 40
 		if (is_int($size)) {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	}
45 45
 
46 46
 	public function setStyle($value) {
47
-		foreach ( $this->elements as $element )
47
+		foreach ($this->elements as $element)
48 48
 			$element->setStyle($value);
49 49
 	}
50 50
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	public function addElement($element) {
65 65
 		$result=$element;
66 66
 		$iid=sizeof($this->elements)+1;
67
-		if (($element instanceof HtmlDropdown)||($element instanceof HtmlSplitbutton)) {
67
+		if (($element instanceof HtmlDropdown) || ($element instanceof HtmlSplitbutton)) {
68 68
 			$this->addExistingDropDown($element);
69 69
 			$this->elements[]=$element;
70 70
 		} elseif ($element instanceof HtmlButton) {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 				else
79 79
 					$bt=new HtmlDropdown($this->identifier."-dropdown-".$iid);
80 80
 				$this->dropdownAsButton($bt);
81
-			} else
81
+			}else
82 82
 				$bt=new HtmlButton($this->identifier."-button-".$iid);
83 83
 			$bt->fromArray($element);
84 84
 			$this->elements[]=$bt;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	}
94 94
 
95 95
 	public function addElements($elements) {
96
-		foreach ( $elements as $element ) {
96
+		foreach ($elements as $element) {
97 97
 			$this->addElement($element);
98 98
 		}
99 99
 		return $this;
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
 	public function setAlignment($value) {
111 111
 		if (is_int($value)) {
112 112
 			$value=CssRef::alignment("btn-group")[$value];
113
-		} else
113
+		}else
114 114
 			$value="btn-group-".$value;
115 115
 		if (strstr($value, "justified")) {
116
-			foreach ( $this->elements as $element ) {
116
+			foreach ($this->elements as $element) {
117 117
 				$element->wrap('<div class="btn-group" role="group">', '</div>');
118 118
 			}
119 119
 		}
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
145 145
 	 */
146 146
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
147
-		foreach ( $this->elements as $element ) {
147
+		foreach ($this->elements as $element) {
148 148
 			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
149 149
 		}
150 150
 		return $this;
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlButtontoolbar.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	public function addElement($element) {
24 24
 		if ($element instanceof HtmlButtongroups) {
25 25
 			$this->elements []=$element;
26
-		} else {
26
+		}else {
27 27
 			$this->getLastButtonGroup()->addElement($element);
28 28
 		}
29 29
 	}
@@ -78,15 +78,15 @@  discard block
 block discarded – undo
78 78
 		$element=null;
79 79
 		$i=0;
80 80
 		if (is_int($index)) {
81
-			$elements=array ();
82
-			foreach ( $this->elements as $group ) {
81
+			$elements=array();
82
+			foreach ($this->elements as $group) {
83 83
 				$elements=array_merge($elements, $group->getElements());
84 84
 			}
85 85
 			if ($index<sizeof($elements)) {
86 86
 				$element=$elements [$index];
87 87
 			}
88
-		} else {
89
-			while ( $element==null&&$i<sizeof($this->elements) ) {
88
+		}else {
89
+			while ($element==null && $i<sizeof($this->elements)) {
90 90
 				$element=$this->elements [$i]->getElement($index);
91 91
 				$i++;
92 92
 			}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlCarousel.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
  * @version 1.001
17 17
  */
18 18
 class HtmlCarousel extends BaseHtml {
19
-	protected $indicators=array ();
20
-	protected $slides=array ();
19
+	protected $indicators=array();
20
+	protected $slides=array();
21 21
 	protected $leftControl="";
22 22
 	protected $rightControl="";
23 23
 	protected $_base="";
24
-	protected $_glyphs=array ();
24
+	protected $_glyphs=array();
25 25
 
26 26
 	public function __construct($identifier, $images=NULL) {
27 27
 		parent::__construct($identifier);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	}
39 39
 
40 40
 	public function setBase($_base) {
41
-		foreach ($this->slides as $slide){
41
+		foreach ($this->slides as $slide) {
42 42
 			$imgSrc=$slide->getImageSrc();
43 43
 			$slide->setImageSrc(str_replace($this->_base.$imgSrc, $_base.$imgSrc, $imgSrc));
44 44
 		}
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
 	}
94 94
 
95 95
 	public function addImage($imageSrc, $imageAlt="", $caption=NULL, $description=NULL) {
96
-		if(is_array($imageSrc)){
97
-			$this->addImage($imageSrc[0],@$imageSrc[1],@$imageSrc[2],@$imageSrc[3]);
98
-		}else{
96
+		if (is_array($imageSrc)) {
97
+			$this->addImage($imageSrc[0], @$imageSrc[1], @$imageSrc[2], @$imageSrc[3]);
98
+		}else {
99 99
 			$image=new HtmlCarouselItem("item-".$this->identifier);
100 100
 			$image->setImageSrc($this->_base.$imageSrc);
101 101
 			$image->setImageAlt($imageAlt);
@@ -118,10 +118,10 @@  discard block
 block discarded – undo
118 118
 	 */
119 119
 	public function fromArray($array) {
120 120
 		if (is_array($array) && sizeof($array)>0) {
121
-			foreach ( $array as $value ) {
121
+			foreach ($array as $value) {
122 122
 				if (is_array($value)) {
123 123
 					$this->addImage($value ["src"], @$value ["alt"], @$value ["caption"], @$value ["description"]);
124
-				} else {
124
+				}else {
125 125
 					$this->addImage($value);
126 126
 				}
127 127
 			}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlCollapse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 		if (!isset($id))
36 36
 			if ($this->element->getTagName()==="a")
37 37
 				$id=$this->element->getProperty("href");
38
-		if (!isset($id)||$id==="#") {
38
+		if (!isset($id) || $id==="#") {
39 39
 			$id="collapse-".$this->element->getIdentifier();
40 40
 			$this->attachTo($id);
41 41
 		}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlDropdown.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 	protected $class="dropdown-toggle";
18 18
 	protected $mClass="dropdown";
19 19
 	protected $mTagName="div";
20
-	protected $items=array ();
20
+	protected $items=array();
21 21
 
22 22
 	/**
23 23
 	 *
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 	 * @return HtmlDropdownItem
88 88
 	 */
89 89
 	public function addItem($caption, $href="#") {
90
-		if($caption instanceof HtmlDropdownItem){
90
+		if ($caption instanceof HtmlDropdownItem) {
91 91
 			$item=$caption;
92
-		}else{
92
+		}else {
93 93
 			$iid=$this->getItemsCount()+1;
94 94
 			$item=new HtmlDropdownItem($this->identifier."-dropdown-item-".$iid);
95 95
 			$item->setCaption($caption)->setHref($href);
@@ -109,14 +109,14 @@  discard block
 block discarded – undo
109 109
 	public function addItems($items) {
110 110
 		$iid=$this->getItemsCount()+1;
111 111
 		if (is_array($items)) {
112
-			foreach ( $items as $item ) {
112
+			foreach ($items as $item) {
113 113
 				if (is_string($item)) {
114 114
 					$this->addItem($item);
115
-				} else if (is_array($item)) {
115
+				}else if (is_array($item)) {
116 116
 					$dropDownItem=new HtmlDropdownItem($this->identifier."-dropdown-item-".$iid);
117 117
 					$dropDownItem->fromArray($item);
118 118
 					$this->items []=$dropDownItem;
119
-				} else if ($item instanceof HtmlDropdownItem) {
119
+				}else if ($item instanceof HtmlDropdownItem) {
120 120
 					$this->items []=$item;
121 121
 				}
122 122
 			}
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	}
137 137
 
138 138
 	public function setItems($items) {
139
-		$this->items=array ();
139
+		$this->items=array();
140 140
 		$this->addItems($items);
141 141
 	}
142 142
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	 */
172 172
 	public function run(JsUtils $js) {
173 173
 		if ($this->getProperty("role")==="nav") {
174
-			foreach ( $this->items as $dropdownItem ) {
174
+			foreach ($this->items as $dropdownItem) {
175 175
 				$dropdownItem->runNav($js);
176 176
 			}
177 177
 		}
@@ -263,9 +263,9 @@  discard block
 block discarded – undo
263 263
 	/* (non-PHPdoc)
264 264
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
265 265
 	 */
266
-	public function on($event, $jsCode, $stopPropagation = false, $preventDefault = false) {
267
-		foreach ($this->items as $item){
268
-			$item->on($event, $jsCode,$stopPropagation,$preventDefault);
266
+	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
267
+		foreach ($this->items as $item) {
268
+			$item->on($event, $jsCode, $stopPropagation, $preventDefault);
269 269
 		}
270 270
 	}
271 271
 
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlForm.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
 	public function __construct($identifier) {
16 16
 		parent::__construct($identifier, "form");
17 17
 		$this->_template='<form id="%identifier%" name="%identifier%" %properties%>%content%</form>';
18
-		$this->futureElements=array ();
19
-		$this->formGroups=array ();
18
+		$this->futureElements=array();
19
+		$this->formGroups=array();
20 20
 	}
21 21
 
22 22
 	/*
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
27 27
 		if (isset($js)) {
28 28
 			$this->formElementsPrefix=$js->config()->getVar("formElementsPrefix");
29
-			foreach ( $this->futureElements as $futureElement ) {
29
+			foreach ($this->futureElements as $futureElement) {
30 30
 				$futureElementValue=$this->getPrefix($futureElement);
31 31
 				$futureElementValues=explode("_", $futureElementValue);
32
-				switch($futureElementValues [0]) {
32
+				switch ($futureElementValues [0]) {
33 33
 					case "input":
34 34
 						$control=new HtmlInput($futureElement);
35 35
 						$control->setClass("form-control");
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 				$this->addElement($control);
62 62
 			}
63 63
 		}
64
-		foreach ( $this->formGroups as $group ) {
64
+		foreach ($this->formGroups as $group) {
65 65
 			$this->addContent($group);
66 66
 		}
67 67
 		return parent::compile($js, $view);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		$result=preg_split('/(?=[A-Z])/', $str);
72 72
 		if (sizeof($result)>$part) {
73 73
 			$result=$result [$part];
74
-		} else {
74
+		}else {
75 75
 			$result=$str;
76 76
 		}
77 77
 		return $result;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		$result=preg_split('/(?=[A-Z])/', $str);
82 82
 		if (sizeof($result)>2) {
83 83
 			$result=$result [2];
84
-		} else {
84
+		}else {
85 85
 			$result=$str;
86 86
 		}
87 87
 		return $result;
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 	private function getPrefix($element) {
91 91
 		$result="input_text";
92
-		foreach ( $this->formElementsPrefix as $k => $v ) {
92
+		foreach ($this->formElementsPrefix as $k => $v) {
93 93
 			if (Text::startsWith($element, $k)) {
94 94
 				$result=$v;
95 95
 				break;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
 	public function getElement($name) {
121 121
 		$element=null;
122
-		foreach ( $this->formGroups as $group ) {
122
+		foreach ($this->formGroups as $group) {
123 123
 		}
124 124
 		return $element;
125 125
 	}
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 * @see \Ajax\bootstrap\html\base\HtmlSingleElement::fromArray()
130 130
 	 */
131 131
 	public function fromArray($array) {
132
-		foreach ( $array as $value ) {
132
+		foreach ($array as $value) {
133 133
 			if (is_string($value)) {
134 134
 				$this->futureElements []=$value;
135 135
 			}
Please login to merge, or discard this patch.