Completed
Push — autoload ( 4808d1...dcd67f )
by Fabio
60:18 queued 50:52
created
framework/Web/UI/TPage.php 1 patch
Spacing   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -181,8 +181,8 @@  discard block
 block discarded – undo
181 181
 	 */
182 182
 	public function run($writer)
183 183
 	{
184
-		Prado::trace("Running page life cycles",'System.Web.UI.TPage');
185
-		$this->_writer = $writer;
184
+		Prado::trace("Running page life cycles", 'System.Web.UI.TPage');
185
+		$this->_writer=$writer;
186 186
 
187 187
 		$this->determinePostBackMode();
188 188
 
@@ -196,85 +196,85 @@  discard block
 block discarded – undo
196 196
 		else
197 197
 			$this->processNormalRequest($writer);
198 198
 
199
-		$this->_writer = null;
199
+		$this->_writer=null;
200 200
 	}
201 201
 
202 202
 	protected function processNormalRequest($writer)
203 203
 	{
204
-		Prado::trace("Page onPreInit()",'System.Web.UI.TPage');
204
+		Prado::trace("Page onPreInit()", 'System.Web.UI.TPage');
205 205
 		$this->onPreInit(null);
206 206
 
207
-		Prado::trace("Page initRecursive()",'System.Web.UI.TPage');
207
+		Prado::trace("Page initRecursive()", 'System.Web.UI.TPage');
208 208
 		$this->initRecursive();
209 209
 
210
-		Prado::trace("Page onInitComplete()",'System.Web.UI.TPage');
210
+		Prado::trace("Page onInitComplete()", 'System.Web.UI.TPage');
211 211
 		$this->onInitComplete(null);
212 212
 
213
-		Prado::trace("Page onPreLoad()",'System.Web.UI.TPage');
213
+		Prado::trace("Page onPreLoad()", 'System.Web.UI.TPage');
214 214
 		$this->onPreLoad(null);
215
-		Prado::trace("Page loadRecursive()",'System.Web.UI.TPage');
215
+		Prado::trace("Page loadRecursive()", 'System.Web.UI.TPage');
216 216
 		$this->loadRecursive();
217
-		Prado::trace("Page onLoadComplete()",'System.Web.UI.TPage');
217
+		Prado::trace("Page onLoadComplete()", 'System.Web.UI.TPage');
218 218
 		$this->onLoadComplete(null);
219 219
 
220
-		Prado::trace("Page preRenderRecursive()",'System.Web.UI.TPage');
220
+		Prado::trace("Page preRenderRecursive()", 'System.Web.UI.TPage');
221 221
 		$this->preRenderRecursive();
222
-		Prado::trace("Page onPreRenderComplete()",'System.Web.UI.TPage');
222
+		Prado::trace("Page onPreRenderComplete()", 'System.Web.UI.TPage');
223 223
 		$this->onPreRenderComplete(null);
224 224
 
225
-		Prado::trace("Page savePageState()",'System.Web.UI.TPage');
225
+		Prado::trace("Page savePageState()", 'System.Web.UI.TPage');
226 226
 		$this->savePageState();
227
-		Prado::trace("Page onSaveStateComplete()",'System.Web.UI.TPage');
227
+		Prado::trace("Page onSaveStateComplete()", 'System.Web.UI.TPage');
228 228
 		$this->onSaveStateComplete(null);
229 229
 
230
-		Prado::trace("Page renderControl()",'System.Web.UI.TPage');
230
+		Prado::trace("Page renderControl()", 'System.Web.UI.TPage');
231 231
 		$this->renderControl($writer);
232
-		Prado::trace("Page unloadRecursive()",'System.Web.UI.TPage');
232
+		Prado::trace("Page unloadRecursive()", 'System.Web.UI.TPage');
233 233
 		$this->unloadRecursive();
234 234
 	}
235 235
 
236 236
 	protected function processPostBackRequest($writer)
237 237
 	{
238
-		Prado::trace("Page onPreInit()",'System.Web.UI.TPage');
238
+		Prado::trace("Page onPreInit()", 'System.Web.UI.TPage');
239 239
 		$this->onPreInit(null);
240 240
 
241
-		Prado::trace("Page initRecursive()",'System.Web.UI.TPage');
241
+		Prado::trace("Page initRecursive()", 'System.Web.UI.TPage');
242 242
 		$this->initRecursive();
243 243
 
244
-		Prado::trace("Page onInitComplete()",'System.Web.UI.TPage');
244
+		Prado::trace("Page onInitComplete()", 'System.Web.UI.TPage');
245 245
 		$this->onInitComplete(null);
246 246
 
247 247
 		$this->_restPostData=new TMap;
248
-		Prado::trace("Page loadPageState()",'System.Web.UI.TPage');
248
+		Prado::trace("Page loadPageState()", 'System.Web.UI.TPage');
249 249
 		$this->loadPageState();
250
-		Prado::trace("Page processPostData()",'System.Web.UI.TPage');
251
-		$this->processPostData($this->_postData,true);
252
-		Prado::trace("Page onPreLoad()",'System.Web.UI.TPage');
250
+		Prado::trace("Page processPostData()", 'System.Web.UI.TPage');
251
+		$this->processPostData($this->_postData, true);
252
+		Prado::trace("Page onPreLoad()", 'System.Web.UI.TPage');
253 253
 		$this->onPreLoad(null);
254
-		Prado::trace("Page loadRecursive()",'System.Web.UI.TPage');
254
+		Prado::trace("Page loadRecursive()", 'System.Web.UI.TPage');
255 255
 		$this->loadRecursive();
256
-		Prado::trace("Page processPostData()",'System.Web.UI.TPage');
257
-		$this->processPostData($this->_restPostData,false);
258
-		Prado::trace("Page raiseChangedEvents()",'System.Web.UI.TPage');
256
+		Prado::trace("Page processPostData()", 'System.Web.UI.TPage');
257
+		$this->processPostData($this->_restPostData, false);
258
+		Prado::trace("Page raiseChangedEvents()", 'System.Web.UI.TPage');
259 259
 		$this->raiseChangedEvents();
260
-		Prado::trace("Page raisePostBackEvent()",'System.Web.UI.TPage');
260
+		Prado::trace("Page raisePostBackEvent()", 'System.Web.UI.TPage');
261 261
 		$this->raisePostBackEvent();
262
-		Prado::trace("Page onLoadComplete()",'System.Web.UI.TPage');
262
+		Prado::trace("Page onLoadComplete()", 'System.Web.UI.TPage');
263 263
 		$this->onLoadComplete(null);
264 264
 
265
-		Prado::trace("Page preRenderRecursive()",'System.Web.UI.TPage');
265
+		Prado::trace("Page preRenderRecursive()", 'System.Web.UI.TPage');
266 266
 		$this->preRenderRecursive();
267
-		Prado::trace("Page onPreRenderComplete()",'System.Web.UI.TPage');
267
+		Prado::trace("Page onPreRenderComplete()", 'System.Web.UI.TPage');
268 268
 		$this->onPreRenderComplete(null);
269 269
 
270
-		Prado::trace("Page savePageState()",'System.Web.UI.TPage');
270
+		Prado::trace("Page savePageState()", 'System.Web.UI.TPage');
271 271
 		$this->savePageState();
272
-		Prado::trace("Page onSaveStateComplete()",'System.Web.UI.TPage');
272
+		Prado::trace("Page onSaveStateComplete()", 'System.Web.UI.TPage');
273 273
 		$this->onSaveStateComplete(null);
274 274
 
275
-		Prado::trace("Page renderControl()",'System.Web.UI.TPage');
275
+		Prado::trace("Page renderControl()", 'System.Web.UI.TPage');
276 276
 		$this->renderControl($writer);
277
-		Prado::trace("Page unloadRecursive()",'System.Web.UI.TPage');
277
+		Prado::trace("Page unloadRecursive()", 'System.Web.UI.TPage');
278 278
 		$this->unloadRecursive();
279 279
 	}
280 280
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 				$data[$k]=self::decodeUTF8($v, $enc);
287 287
 			return $data;
288 288
 		} elseif(is_string($data)) {
289
-			return iconv('UTF-8',$enc.'//IGNORE',$data);
289
+			return iconv('UTF-8', $enc.'//IGNORE', $data);
290 290
 		} else {
291 291
 			return $data;
292 292
 		}
@@ -303,39 +303,39 @@  discard block
 block discarded – undo
303 303
 
304 304
 		$this->setAdapter(new TActivePageAdapter($this));
305 305
 
306
-        $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER);
306
+        $callbackEventParameter=$this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER);
307 307
         if(strlen($callbackEventParameter) > 0)
308
-            $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter);
308
+            $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string) $callbackEventParameter);
309 309
 
310 310
         // Decode Callback postData from UTF-8 to current Charset
311
-        if (($g=$this->getApplication()->getGlobalization(false))!==null &&
311
+        if(($g=$this->getApplication()->getGlobalization(false))!==null &&
312 312
             strtoupper($enc=$g->getCharset())!='UTF-8')
313
-                foreach ($this->_postData as $k=>$v)
313
+                foreach($this->_postData as $k=>$v)
314 314
                 	$this->_postData[$k]=self::decodeUTF8($v, $enc);
315 315
 
316
-		Prado::trace("Page onPreInit()",'System.Web.UI.TPage');
316
+		Prado::trace("Page onPreInit()", 'System.Web.UI.TPage');
317 317
 		$this->onPreInit(null);
318 318
 
319
-		Prado::trace("Page initRecursive()",'System.Web.UI.TPage');
319
+		Prado::trace("Page initRecursive()", 'System.Web.UI.TPage');
320 320
 		$this->initRecursive();
321 321
 
322
-		Prado::trace("Page onInitComplete()",'System.Web.UI.TPage');
322
+		Prado::trace("Page onInitComplete()", 'System.Web.UI.TPage');
323 323
 		$this->onInitComplete(null);
324 324
 
325 325
 		$this->_restPostData=new TMap;
326
-		Prado::trace("Page loadPageState()",'System.Web.UI.TPage');
326
+		Prado::trace("Page loadPageState()", 'System.Web.UI.TPage');
327 327
 		$this->loadPageState();
328
-		Prado::trace("Page processPostData()",'System.Web.UI.TPage');
329
-		$this->processPostData($this->_postData,true);
330
-		Prado::trace("Page onPreLoad()",'System.Web.UI.TPage');
328
+		Prado::trace("Page processPostData()", 'System.Web.UI.TPage');
329
+		$this->processPostData($this->_postData, true);
330
+		Prado::trace("Page onPreLoad()", 'System.Web.UI.TPage');
331 331
 		$this->onPreLoad(null);
332
-		Prado::trace("Page loadRecursive()",'System.Web.UI.TPage');
332
+		Prado::trace("Page loadRecursive()", 'System.Web.UI.TPage');
333 333
 		$this->loadRecursive();
334 334
 
335
-		Prado::trace("Page processPostData()",'System.Web.UI.TPage');
336
-		$this->processPostData($this->_restPostData,false);
335
+		Prado::trace("Page processPostData()", 'System.Web.UI.TPage');
336
+		$this->processPostData($this->_restPostData, false);
337 337
 
338
-		Prado::trace("Page raiseChangedEvents()",'System.Web.UI.TPage');
338
+		Prado::trace("Page raiseChangedEvents()", 'System.Web.UI.TPage');
339 339
 		$this->raiseChangedEvents();
340 340
 
341 341
 
@@ -345,17 +345,17 @@  discard block
 block discarded – undo
345 345
 		Prado::trace("Page raisePostBackEvent()",'System.Web.UI.TPage');
346 346
 		$this->raisePostBackEvent();
347 347
 */
348
-		Prado::trace("Page onLoadComplete()",'System.Web.UI.TPage');
348
+		Prado::trace("Page onLoadComplete()", 'System.Web.UI.TPage');
349 349
 		$this->onLoadComplete(null);
350 350
 
351
-		Prado::trace("Page preRenderRecursive()",'System.Web.UI.TPage');
351
+		Prado::trace("Page preRenderRecursive()", 'System.Web.UI.TPage');
352 352
 		$this->preRenderRecursive();
353
-		Prado::trace("Page onPreRenderComplete()",'System.Web.UI.TPage');
353
+		Prado::trace("Page onPreRenderComplete()", 'System.Web.UI.TPage');
354 354
 		$this->onPreRenderComplete(null);
355 355
 
356
-		Prado::trace("Page savePageState()",'System.Web.UI.TPage');
356
+		Prado::trace("Page savePageState()", 'System.Web.UI.TPage');
357 357
 		$this->savePageState();
358
-		Prado::trace("Page onSaveStateComplete()",'System.Web.UI.TPage');
358
+		Prado::trace("Page onSaveStateComplete()", 'System.Web.UI.TPage');
359 359
 		$this->onSaveStateComplete(null);
360 360
 
361 361
 /*
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 */
365 365
 		$this->getAdapter()->renderCallbackResponse($writer);
366 366
 
367
-		Prado::trace("Page unloadRecursive()",'System.Web.UI.TPage');
367
+		Prado::trace("Page unloadRecursive()", 'System.Web.UI.TPage');
368 368
 		$this->unloadRecursive();
369 369
 	}
370 370
 
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 	 */
376 376
 	public function getCallbackClient()
377 377
 	{
378
-		if($this->getAdapter() !== null)
378
+		if($this->getAdapter()!==null)
379 379
 			return $this->getAdapter()->getCallbackClientHandler();
380 380
 		else
381 381
 			return new TCallbackClientScript();
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 	{
458 458
 		if(!$this->_validators)
459 459
 			$this->_validators=new TList;
460
-		if(empty($validationGroup) === true)
460
+		if(empty($validationGroup)===true)
461 461
 			return $this->_validators;
462 462
 		else
463 463
 		{
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 	 */
478 478
 	public function validate($validationGroup=null)
479 479
 	{
480
-		Prado::trace("Page validate()",'System.Web.UI.TPage');
480
+		Prado::trace("Page validate()", 'System.Web.UI.TPage');
481 481
 		$this->_validated=true;
482 482
 		if($this->_validators && $this->_validators->getCount())
483 483
 		{
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 	 */
536 536
 	public function setTheme($value)
537 537
 	{
538
-		$this->_theme=empty($value)?null:$value;
538
+		$this->_theme=empty($value) ? null : $value;
539 539
 	}
540 540
 
541 541
 
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 	 */
556 556
 	public function setStyleSheetTheme($value)
557 557
 	{
558
-		$this->_styleSheet=empty($value)?null:$value;
558
+		$this->_styleSheet=empty($value) ? null : $value;
559 559
 	}
560 560
 
561 561
 	/**
@@ -586,13 +586,13 @@  discard block
 block discarded – undo
586 586
 	public function getClientScript()
587 587
 	{
588 588
 		if(!$this->_clientScript) {
589
-			$className = $classPath = $this->getService()->getClientScriptManagerClass();
589
+			$className=$classPath=$this->getService()->getClientScriptManagerClass();
590 590
 			Prado::using($className);
591
-			if(($pos=strrpos($className,'.'))!==false)
592
-				$className=substr($className,$pos+1);
591
+			if(($pos=strrpos($className, '.'))!==false)
592
+				$className=substr($className, $pos + 1);
593 593
 
594
- 			if(!class_exists($className,false) || ($className!=='TClientScriptManager' && !is_subclass_of($className,'TClientScriptManager')))
595
-				throw new THttpException(404,'page_csmanagerclass_invalid',$classPath);
594
+ 			if(!class_exists($className, false) || ($className!=='TClientScriptManager' && !is_subclass_of($className, 'TClientScriptManager')))
595
+				throw new THttpException(404, 'page_csmanagerclass_invalid', $classPath);
596 596
 
597 597
 			$this->_clientScript=new $className($this);
598 598
 		}
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
 	 */
611 611
 	public function onPreInit($param)
612 612
 	{
613
-		$this->raiseEvent('OnPreInit',$this,$param);
613
+		$this->raiseEvent('OnPreInit', $this, $param);
614 614
 	}
615 615
 
616 616
 	/**
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
 	 */
624 624
 	public function onInitComplete($param)
625 625
 	{
626
-		$this->raiseEvent('OnInitComplete',$this,$param);
626
+		$this->raiseEvent('OnInitComplete', $this, $param);
627 627
 	}
628 628
 
629 629
 	/**
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 	 */
637 637
 	public function onPreLoad($param)
638 638
 	{
639
-		$this->raiseEvent('OnPreLoad',$this,$param);
639
+		$this->raiseEvent('OnPreLoad', $this, $param);
640 640
 	}
641 641
 
642 642
 	/**
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
 	 */
650 650
 	public function onLoadComplete($param)
651 651
 	{
652
-		$this->raiseEvent('OnLoadComplete',$this,$param);
652
+		$this->raiseEvent('OnLoadComplete', $this, $param);
653 653
 	}
654 654
 
655 655
 	/**
@@ -662,23 +662,23 @@  discard block
 block discarded – undo
662 662
 	 */
663 663
 	public function onPreRenderComplete($param)
664 664
 	{
665
-		$this->raiseEvent('OnPreRenderComplete',$this,$param);
665
+		$this->raiseEvent('OnPreRenderComplete', $this, $param);
666 666
 		$cs=$this->getClientScript();
667 667
 		$theme=$this->getTheme();
668 668
 		if($theme instanceof ITheme)
669 669
 		{
670 670
 			foreach($theme->getStyleSheetFiles() as $url)
671
-				$cs->registerStyleSheetFile($url,$url,$this->getCssMediaType($url));
671
+				$cs->registerStyleSheetFile($url, $url, $this->getCssMediaType($url));
672 672
 			foreach($theme->getJavaScriptFiles() as $url)
673
-				$cs->registerHeadScriptFile($url,$url);
673
+				$cs->registerHeadScriptFile($url, $url);
674 674
 		}
675 675
 		$styleSheet=$this->getStyleSheetTheme();
676 676
 		if($styleSheet instanceof ITheme)
677 677
 		{
678 678
 			foreach($styleSheet->getStyleSheetFiles() as $url)
679
-				$cs->registerStyleSheetFile($url,$url,$this->getCssMediaType($url));
679
+				$cs->registerStyleSheetFile($url, $url, $this->getCssMediaType($url));
680 680
 			foreach($styleSheet->getJavaScriptFiles() as $url)
681
-				$cs->registerHeadScriptFile($url,$url);
681
+				$cs->registerHeadScriptFile($url, $url);
682 682
 		}
683 683
 
684 684
 		if($cs->getRequiresHead() && $this->getHead()===null)
@@ -695,9 +695,9 @@  discard block
 block discarded – undo
695 695
 	 */
696 696
 	private function getCssMediaType($url)
697 697
 	{
698
-		$segs=explode('.',basename($url));
698
+		$segs=explode('.', basename($url));
699 699
 		if(isset($segs[2]))
700
-			return $segs[count($segs)-2];
700
+			return $segs[count($segs) - 2];
701 701
 		else
702 702
 			return '';
703 703
 	}
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
 	 */
712 712
 	public function onSaveStateComplete($param)
713 713
 	{
714
-		$this->raiseEvent('OnSaveStateComplete',$this,$param);
714
+		$this->raiseEvent('OnSaveStateComplete', $this, $param);
715 715
 	}
716 716
 
717 717
 	/**
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 	public function saveState()
750 750
 	{
751 751
 		parent::saveState();
752
-		$this->setViewState('ControlsRequiringPostBack',$this->_controlsRegisteredForPostData,array());
752
+		$this->setViewState('ControlsRequiringPostBack', $this->_controlsRegisteredForPostData, array());
753 753
 	}
754 754
 
755 755
 	/**
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
 	public function loadState()
761 761
 	{
762 762
 		parent::loadState();
763
-		$this->_controlsRequiringPostData=$this->getViewState('ControlsRequiringPostBack',array());
763
+		$this->_controlsRequiringPostData=$this->getViewState('ControlsRequiringPostBack', array());
764 764
 	}
765 765
 
766 766
 	/**
@@ -768,9 +768,9 @@  discard block
 block discarded – undo
768 768
 	 */
769 769
 	protected function loadPageState()
770 770
 	{
771
-		Prado::trace("Loading state",'System.Web.UI.TPage');
771
+		Prado::trace("Loading state", 'System.Web.UI.TPage');
772 772
 		$state=$this->getStatePersister()->load();
773
-		$this->loadStateRecursive($state,$this->getEnableViewState());
773
+		$this->loadStateRecursive($state, $this->getEnableViewState());
774 774
 	}
775 775
 
776 776
 	/**
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
 	 */
779 779
 	protected function savePageState()
780 780
 	{
781
-		Prado::trace("Saving state",'System.Web.UI.TPage');
781
+		Prado::trace("Saving state", 'System.Web.UI.TPage');
782 782
 		$state=&$this->saveStateRecursive($this->getEnableViewState());
783 783
 		$this->getStatePersister()->save($state);
784 784
 	}
@@ -801,11 +801,11 @@  discard block
 block discarded – undo
801 801
 	 */
802 802
 	public function registerRequiresPostData($control)
803 803
 	{
804
-		$id=is_string($control)?$control:$control->getUniqueID();
804
+		$id=is_string($control) ? $control : $control->getUniqueID();
805 805
 		$this->_controlsRegisteredForPostData[$id]=true;
806 806
 		$params=func_get_args();
807 807
 		foreach($this->getCachingStack() as $item)
808
-			$item->registerAction('Page','registerRequiresPostData',array($id));
808
+			$item->registerAction('Page', 'registerRequiresPostData', array($id));
809 809
 	}
810 810
 
811 811
 	/**
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
 	 * @param TMap post data to be processed
858 858
 	 * @param boolean whether this method is invoked before {@link onLoad OnLoad}.
859 859
 	 */
860
-	protected function processPostData($postData,$beforeLoad)
860
+	protected function processPostData($postData, $beforeLoad)
861 861
 	{
862 862
 		$this->_isLoadingPostData=true;
863 863
 		if($beforeLoad)
@@ -870,18 +870,18 @@  discard block
 block discarded – undo
870 870
 			{
871 871
 				if($control instanceof IPostBackDataHandler)
872 872
 				{
873
-					if($control->loadPostData($key,$postData))
873
+					if($control->loadPostData($key, $postData))
874 874
 						$this->_controlsPostDataChanged[]=$control;
875 875
 				}
876 876
 				else if($control instanceof IPostBackEventHandler &&
877 877
 					empty($this->_postData[self::FIELD_POSTBACK_TARGET]))
878 878
 				{
879
-					$this->_postData->add(self::FIELD_POSTBACK_TARGET,$key);  // not calling setPostBackEventTarget() because the control may be removed later
879
+					$this->_postData->add(self::FIELD_POSTBACK_TARGET, $key); // not calling setPostBackEventTarget() because the control may be removed later
880 880
 				}
881 881
 				unset($this->_controlsRequiringPostData[$key]);
882 882
 			}
883 883
 			else if($beforeLoad)
884
-				$this->_restPostData->add($key,$value);
884
+				$this->_restPostData->add($key, $value);
885 885
 		}
886 886
 
887 887
 		foreach($this->_controlsRequiringPostData as $key=>$value)
@@ -890,11 +890,11 @@  discard block
 block discarded – undo
890 890
 			{
891 891
 				if($control instanceof IPostBackDataHandler)
892 892
 				{
893
-					if($control->loadPostData($key,$this->_postData))
893
+					if($control->loadPostData($key, $this->_postData))
894 894
 						$this->_controlsPostDataChanged[]=$control;
895 895
 				}
896 896
 				else
897
-					throw new TInvalidDataValueException('page_postbackcontrol_invalid',$key);
897
+					throw new TInvalidDataValueException('page_postbackcontrol_invalid', $key);
898 898
 				unset($this->_controlsRequiringPostData[$key]);
899 899
 			}
900 900
 		}
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
 	public function ensureRenderInForm($control)
946 946
 	{
947 947
 		if(!$this->getIsCallback() && !$this->_inFormRender)
948
-			throw new TConfigurationException('page_control_outofform',get_class($control), $control ? $control->getUniqueID() : null);
948
+			throw new TConfigurationException('page_control_outofform', get_class($control), $control ? $control->getUniqueID() : null);
949 949
 	}
950 950
 
951 951
 	/**
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
 		if($this->_formRendered)
957 957
 			throw new TConfigurationException('page_form_duplicated');
958 958
 		$this->_formRendered=true;
959
-		$this->getClientScript()->registerHiddenField(self::FIELD_PAGESTATE,$this->getClientState());
959
+		$this->getClientScript()->registerHiddenField(self::FIELD_PAGESTATE, $this->getClientState());
960 960
 		$this->_inFormRender=true;
961 961
 	}
962 962
 
@@ -1186,12 +1186,12 @@  discard block
 block discarded – undo
1186 1186
 	 * @param string method name of the context object
1187 1187
 	 * @param array list of parameters to be passed to the action method
1188 1188
 	 */
1189
-	public function registerCachingAction($context,$funcName,$funcParams)
1189
+	public function registerCachingAction($context, $funcName, $funcParams)
1190 1190
 	{
1191 1191
 		if($this->_cachingStack)
1192 1192
 		{
1193 1193
 			foreach($this->_cachingStack as $cache)
1194
-				$cache->registerAction($context,$funcName,$funcParams);
1194
+				$cache->registerAction($context, $funcName, $funcParams);
1195 1195
 		}
1196 1196
 	}
1197 1197
 
@@ -1210,7 +1210,7 @@  discard block
 block discarded – undo
1210 1210
 	 */
1211 1211
 	public function flushWriter()
1212 1212
 	{
1213
-		if ($this->_writer)
1213
+		if($this->_writer)
1214 1214
 			$this->Response->write($this->_writer->flush());
1215 1215
 	}
1216 1216
 
@@ -1274,7 +1274,7 @@  discard block
 block discarded – undo
1274 1274
 	 * @param mixed state data
1275 1275
 	 * @return string serialized data
1276 1276
 	 */
1277
-	public static function serialize($page,$data)
1277
+	public static function serialize($page, $data)
1278 1278
 	{
1279 1279
 		$sm=$page->getApplication()->getSecurityManager();
1280 1280
 		if($page->getEnableStateValidation())
@@ -1293,7 +1293,7 @@  discard block
 block discarded – undo
1293 1293
 	 * @param string serialized data
1294 1294
 	 * @return mixed unserialized state data, null if data is corrupted
1295 1295
 	 */
1296
-	public static function unserialize($page,$data)
1296
+	public static function unserialize($page, $data)
1297 1297
 	{
1298 1298
 		$str=base64_decode($data);
1299 1299
 		if($str==='')
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataListItemRenderer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public function getHasStyle()
47 47
 	{
48
-		return $this->getViewState('Style',null)!==null;
48
+		return $this->getViewState('Style', null)!==null;
49 49
 	}
50 50
 
51 51
 	/**
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	public function getStyle()
55 55
 	{
56
-		if($style=$this->getViewState('Style',null))
56
+		if($style=$this->getViewState('Style', null))
57 57
 			return $style;
58 58
 		else
59 59
 		{
60 60
 			$style=$this->createStyle();
61
-			$this->setViewState('Style',$style,null);
61
+			$this->setViewState('Style', $style, null);
62 62
 			return $style;
63 63
 		}
64 64
 	}
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 	 * @param TEventParameter event parameter
79 79
 	 * @return boolean whether the event bubbling should stop here.
80 80
 	 */
81
-	public function bubbleEvent($sender,$param)
81
+	public function bubbleEvent($sender, $param)
82 82
 	{
83 83
 		if($param instanceof TCommandEventParameter)
84 84
 		{
85
-			$this->raiseBubbleEvent($this,new TDataListCommandEventParameter($this,$sender,$param));
85
+			$this->raiseBubbleEvent($this, new TDataListCommandEventParameter($this, $sender, $param));
86 86
 			return true;
87 87
 		}
88 88
 		else
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	protected function addAttributesToRender($writer)
111 111
 	{
112
-		if($style=$this->getViewState('Style',null))
112
+		if($style=$this->getViewState('Style', null))
113 113
 			$style->addAttributesToRender($writer);
114 114
 	}
115 115
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THyperLinkColumn.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public function getText()
56 56
 	{
57
-		return $this->getViewState('Text','');
57
+		return $this->getViewState('Text', '');
58 58
 	}
59 59
 
60 60
 	/**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function setText($value)
65 65
 	{
66
-		$this->setViewState('Text',$value,'');
66
+		$this->setViewState('Text', $value, '');
67 67
 	}
68 68
 
69 69
 	/**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function getDataTextField()
73 73
 	{
74
-		return $this->getViewState('DataTextField','');
74
+		return $this->getViewState('DataTextField', '');
75 75
 	}
76 76
 
77 77
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function setDataTextField($value)
81 81
 	{
82
-		$this->setViewState('DataTextField',$value,'');
82
+		$this->setViewState('DataTextField', $value, '');
83 83
 	}
84 84
 
85 85
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function getDataTextFormatString()
89 89
 	{
90
-		return $this->getViewState('DataTextFormatString','');
90
+		return $this->getViewState('DataTextFormatString', '');
91 91
 	}
92 92
 
93 93
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function setDataTextFormatString($value)
97 97
 	{
98
-		$this->setViewState('DataTextFormatString',$value,'');
98
+		$this->setViewState('DataTextFormatString', $value, '');
99 99
 	}
100 100
 
101 101
 	/**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function getImageHeight()
105 105
 	{
106
-		return $this->getViewState('ImageHeight','');
106
+		return $this->getViewState('ImageHeight', '');
107 107
 	}
108 108
 
109 109
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public function setImageHeight($value)
113 113
 	{
114
-		$this->setViewState('ImageHeight',$value,'');
114
+		$this->setViewState('ImageHeight', $value, '');
115 115
 	}
116 116
 
117 117
 	/**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	public function getImageUrl()
121 121
 	{
122
-		return $this->getViewState('ImageUrl','');
122
+		return $this->getViewState('ImageUrl', '');
123 123
 	}
124 124
 
125 125
 	/**
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	public function setImageUrl($value)
129 129
 	{
130
-		$this->setViewState('ImageUrl',$value,'');
130
+		$this->setViewState('ImageUrl', $value, '');
131 131
 	}
132 132
 
133 133
 	/**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function getImageWidth()
137 137
 	{
138
-		return $this->getViewState('ImageWidth','');
138
+		return $this->getViewState('ImageWidth', '');
139 139
 	}
140 140
 
141 141
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public function setImageWidth($value)
145 145
 	{
146
-		$this->setViewState('ImageWidth',$value,'');
146
+		$this->setViewState('ImageWidth', $value, '');
147 147
 	}
148 148
 
149 149
 	/**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public function getNavigateUrl()
153 153
 	{
154
-		return $this->getViewState('NavigateUrl','');
154
+		return $this->getViewState('NavigateUrl', '');
155 155
 	}
156 156
 
157 157
 	/**
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	 */
161 161
 	public function setNavigateUrl($value)
162 162
 	{
163
-		$this->setViewState('NavigateUrl',$value,'');
163
+		$this->setViewState('NavigateUrl', $value, '');
164 164
 	}
165 165
 
166 166
 	/**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public function getDataNavigateUrlField()
170 170
 	{
171
-		return $this->getViewState('DataNavigateUrlField','');
171
+		return $this->getViewState('DataNavigateUrlField', '');
172 172
 	}
173 173
 
174 174
 	/**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	public function setDataNavigateUrlField($value)
178 178
 	{
179
-		$this->setViewState('DataNavigateUrlField',$value,'');
179
+		$this->setViewState('DataNavigateUrlField', $value, '');
180 180
 	}
181 181
 
182 182
 	/**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	public function getDataNavigateUrlFormatString()
186 186
 	{
187
-		return $this->getViewState('DataNavigateUrlFormatString','');
187
+		return $this->getViewState('DataNavigateUrlFormatString', '');
188 188
 	}
189 189
 
190 190
 	/**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 */
193 193
 	public function setDataNavigateUrlFormatString($value)
194 194
 	{
195
-		$this->setViewState('DataNavigateUrlFormatString',$value,'');
195
+		$this->setViewState('DataNavigateUrlFormatString', $value, '');
196 196
 	}
197 197
 
198 198
 	/**
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public function getTarget()
202 202
 	{
203
-		return $this->getViewState('Target','');
203
+		return $this->getViewState('Target', '');
204 204
 	}
205 205
 
206 206
 	/**
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 	 */
210 210
 	public function setTarget($value)
211 211
 	{
212
-		$this->setViewState('Target',$value,'');
212
+		$this->setViewState('Target', $value, '');
213 213
 	}
214 214
 
215 215
 	/**
@@ -220,12 +220,12 @@  discard block
 block discarded – undo
220 220
 	 * @param integer the index to the Columns property that the cell resides in.
221 221
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
222 222
 	 */
223
-	public function initializeCell($cell,$columnIndex,$itemType)
223
+	public function initializeCell($cell, $columnIndex, $itemType)
224 224
 	{
225 225
 		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem)
226 226
 		{
227 227
 			$link=new THyperLink;
228
-			if(($url = $this->getImageUrl())!=='')
228
+			if(($url=$this->getImageUrl())!=='')
229 229
 			{
230 230
 				$link->setImageUrl($url);
231 231
 				if(($width=$this->getImageWidth())!=='')
@@ -237,12 +237,12 @@  discard block
 block discarded – undo
237 237
 			$link->setNavigateUrl($this->getNavigateUrl());
238 238
 			$link->setTarget($this->getTarget());
239 239
 			if($this->getDataTextField()!=='' || $this->getDataNavigateUrlField()!=='')
240
-				$link->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
240
+				$link->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
241 241
 			$cell->getControls()->add($link);
242
-			$cell->registerObject('HyperLink',$link);
242
+			$cell->registerObject('HyperLink', $link);
243 243
 		}
244 244
 		else
245
-			parent::initializeCell($cell,$columnIndex,$itemType);
245
+			parent::initializeCell($cell, $columnIndex, $itemType);
246 246
 	}
247 247
 
248 248
 	/**
@@ -250,20 +250,20 @@  discard block
 block discarded – undo
250 250
 	 * This method is invoked when datagrid performs databinding.
251 251
 	 * It populates the content of the cell with the relevant data from data source.
252 252
 	 */
253
-	public function dataBindColumn($sender,$param)
253
+	public function dataBindColumn($sender, $param)
254 254
 	{
255 255
 		$item=$sender->getNamingContainer();
256 256
 		$data=$item->getData();
257 257
 		if(($field=$this->getDataTextField())!=='')
258 258
 		{
259
-			$value=$this->getDataFieldValue($data,$field);
260
-			$text=$this->formatDataValue($this->getDataTextFormatString(),$value);
259
+			$value=$this->getDataFieldValue($data, $field);
260
+			$text=$this->formatDataValue($this->getDataTextFormatString(), $value);
261 261
 			$sender->setText($text);
262 262
 		}
263 263
 		if(($field=$this->getDataNavigateUrlField())!=='')
264 264
 		{
265
-			$value=$this->getDataFieldValue($data,$field);
266
-			$url=$this->formatDataValue($this->getDataNavigateUrlFormatString(),$value);
265
+			$value=$this->getDataFieldValue($data, $field);
266
+			$url=$this->formatDataValue($this->getDataNavigateUrlFormatString(), $value);
267 267
 			$sender->setNavigateUrl($url);
268 268
 		}
269 269
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TInlineFrame.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public function getAlign()
46 46
 	{
47
-		return $this->getViewState('Align',TInlineFrameAlign::NotSet);
47
+		return $this->getViewState('Align', TInlineFrameAlign::NotSet);
48 48
 	}
49 49
 
50 50
 	/**
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function setAlign($value)
54 54
 	{
55
-		$this->setViewState('Align',TPropertyValue::ensureEnum($value,'TInlineFrameAlign'),TInlineFrameAlign::NotSet);
55
+		$this->setViewState('Align', TPropertyValue::ensureEnum($value, 'TInlineFrameAlign'), TInlineFrameAlign::NotSet);
56 56
 	}
57 57
 
58 58
 	/**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 */
61 61
 	public function getDescriptionUrl()
62 62
 	{
63
-		return $this->getViewState('DescriptionUrl','');
63
+		return $this->getViewState('DescriptionUrl', '');
64 64
 	}
65 65
 
66 66
 	/**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	public function setDescriptionUrl($value)
70 70
 	{
71
-		$this->setViewState('DescriptionUrl',$value,'');
71
+		$this->setViewState('DescriptionUrl', $value, '');
72 72
 	}
73 73
 
74 74
 	/**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function getShowBorder()
78 78
 	{
79
-		return $this->getViewState('ShowBorder',true);
79
+		return $this->getViewState('ShowBorder', true);
80 80
 	}
81 81
 
82 82
 	/**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 */
85 85
 	public function setShowBorder($value)
86 86
 	{
87
-		$this->setViewState('ShowBorder',TPropertyValue::ensureBoolean($value),true);
87
+		$this->setViewState('ShowBorder', TPropertyValue::ensureBoolean($value), true);
88 88
 	}
89 89
 
90 90
 	/**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	 */
93 93
 	public function getFrameUrl()
94 94
 	{
95
-		return $this->getViewState('FrameUrl','');
95
+		return $this->getViewState('FrameUrl', '');
96 96
 	}
97 97
 
98 98
 	/**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function setFrameUrl($value)
102 102
 	{
103
-		$this->setViewState('FrameUrl',$value,'');
103
+		$this->setViewState('FrameUrl', $value, '');
104 104
 	}
105 105
 
106 106
 	/**
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	 */
135 135
 	public function getScrollBars()
136 136
 	{
137
-		return $this->getViewState('ScrollBars',TInlineFrameScrollBars::Auto);
137
+		return $this->getViewState('ScrollBars', TInlineFrameScrollBars::Auto);
138 138
 	}
139 139
 
140 140
 	/**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	 */
143 143
 	public function setScrollBars($value)
144 144
 	{
145
-		$this->setViewState('ScrollBars',TPropertyValue::ensureEnum($value,'TInlineFrameScrollBars'),TInlineFrameScrollBars::Auto);
145
+		$this->setViewState('ScrollBars', TPropertyValue::ensureEnum($value, 'TInlineFrameScrollBars'), TInlineFrameScrollBars::Auto);
146 146
 	}
147 147
 
148 148
 	/**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	 */
151 151
 	public function getWidth()
152 152
 	{
153
-	  return $this->getViewState('Width',-1);
153
+	  return $this->getViewState('Width', -1);
154 154
 	}
155 155
 	
156 156
 	/**
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
 	 */
159 159
 	public function setWidth($value)
160 160
 	{
161
-	  if(($value=TPropertyValue::ensureInteger($value))<0)
161
+	  if(($value=TPropertyValue::ensureInteger($value)) < 0)
162 162
 	    $value=-1;
163
-	  $this->setViewState('Width',$value,-1);
163
+	  $this->setViewState('Width', $value, -1);
164 164
 	}
165 165
 	
166 166
 	/**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public function getHeight()
170 170
 	{
171
-	  return $this->getViewState('Height',-1);
171
+	  return $this->getViewState('Height', -1);
172 172
 	}
173 173
 	
174 174
 	/**
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	public function setHeight($value)
178 178
 	{
179
-	  if(($value=TPropertyValue::ensureInteger($value))<0)
179
+	  if(($value=TPropertyValue::ensureInteger($value)) < 0)
180 180
 	    $value=-1;
181
-	  $this->setViewState('Height',$value,-1);
181
+	  $this->setViewState('Height', $value, -1);
182 182
 	}
183 183
 	
184 184
 	/**
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 */
188 188
 	public function getMarginWidth()
189 189
 	{
190
-		return $this->getViewState('MarginWidth',-1);
190
+		return $this->getViewState('MarginWidth', -1);
191 191
 	}
192 192
 
193 193
 	/**
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 	 */
197 197
 	public function setMarginWidth($value)
198 198
 	{
199
-		if(($value=TPropertyValue::ensureInteger($value))<0)
199
+		if(($value=TPropertyValue::ensureInteger($value)) < 0)
200 200
 			$value=-1;
201
-		$this->setViewState('MarginWidth',$value,-1);
201
+		$this->setViewState('MarginWidth', $value, -1);
202 202
 	}
203 203
 
204 204
 	/**
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	 */
208 208
 	public function getMarginHeight()
209 209
 	{
210
-		return $this->getViewState('MarginHeight',-1);
210
+		return $this->getViewState('MarginHeight', -1);
211 211
 	}
212 212
 
213 213
 	/**
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
 	 */
217 217
 	public function setMarginHeight($value)
218 218
 	{
219
-		if(($value=TPropertyValue::ensureInteger($value))<0)
219
+		if(($value=TPropertyValue::ensureInteger($value)) < 0)
220 220
 			$value=-1;
221
-		$this->setViewState('MarginHeight',$value,-1);
221
+		$this->setViewState('MarginHeight', $value, -1);
222 222
 	}
223 223
 
224 224
 	/**
@@ -229,37 +229,37 @@  discard block
 block discarded – undo
229 229
 	protected function addAttributesToRender($writer)
230 230
 	{
231 231
 		if($this->getID()!=='')
232
-			$writer->addAttribute('name',$this->getUniqueID());
232
+			$writer->addAttribute('name', $this->getUniqueID());
233 233
 
234 234
 		if(($src=$this->getFrameUrl())!=='')
235
-			$writer->addAttribute('src',$src);
235
+			$writer->addAttribute('src', $src);
236 236
 
237 237
 		if(($align=strtolower($this->getAlign()))!=='notset')
238
-			$writer->addAttribute('align',$align);
238
+			$writer->addAttribute('align', $align);
239 239
 
240 240
 		$scrollBars=$this->getScrollBars();
241 241
 		if($scrollBars===TInlineFrameScrollBars::None)
242
-			$writer->addAttribute('scrolling','no');
242
+			$writer->addAttribute('scrolling', 'no');
243 243
 		else if($scrollBars===TInlineFrameScrollBars::Both)
244
-			$writer->addAttribute('scrolling','yes');
244
+			$writer->addAttribute('scrolling', 'yes');
245 245
 
246
-		if (!$this->getShowBorder())
247
-			$writer->addAttribute('frameborder','0');
246
+		if(!$this->getShowBorder())
247
+			$writer->addAttribute('frameborder', '0');
248 248
 
249 249
 		if(($longdesc=$this->getDescriptionUrl())!=='')
250
-			$writer->addAttribute('longdesc',$longdesc);
250
+			$writer->addAttribute('longdesc', $longdesc);
251 251
 		
252
-		if (($width=$this->getWidth())!==-1)
253
-		  $writer->addAttribute('width',$width);
252
+		if(($width=$this->getWidth())!==-1)
253
+		  $writer->addAttribute('width', $width);
254 254
 		
255
-		if (($height=$this->getHeight())!==-1)
256
-		  $writer->addAttribute('height',$height);
255
+		if(($height=$this->getHeight())!==-1)
256
+		  $writer->addAttribute('height', $height);
257 257
 
258 258
 		if(($marginheight=$this->getMarginHeight())!==-1)
259
-			$writer->addAttribute('marginheight',$marginheight);
259
+			$writer->addAttribute('marginheight', $marginheight);
260 260
 
261 261
 		if(($marginwidth=$this->getMarginWidth())!==-1)
262
-			$writer->addAttribute('marginwidth',$marginwidth);
262
+			$writer->addAttribute('marginwidth', $marginwidth);
263 263
 
264 264
 		parent::addAttributesToRender($writer);
265 265
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TFont.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
 	protected function __getZappableSleepProps(&$exprops)
63 63
 	{
64 64
 		parent::__getZappableSleepProps($exprops);
65
-		if ($this->_flags===0)
66
-			$exprops[] = "\0TFont\0_flags";
67
-		if ($this->_name==='')
68
-			$exprops[] = "\0TFont\0_name";
69
-		if ($this->_size==='')
70
-			$exprops[] = "\0TFont\0_size";
65
+		if($this->_flags===0)
66
+			$exprops[]="\0TFont\0_flags";
67
+		if($this->_name==='')
68
+			$exprops[]="\0TFont\0_name";
69
+		if($this->_size==='')
70
+			$exprops[]="\0TFont\0_size";
71 71
 	}
72 72
 
73 73
 	/**
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
 	 */
84 84
 	public function setBold($value)
85 85
 	{
86
-		$this->_flags |= self::IS_SET_BOLD;
86
+		$this->_flags|=self::IS_SET_BOLD;
87 87
 		if(TPropertyValue::ensureBoolean($value))
88
-			$this->_flags |= self::IS_BOLD;
88
+			$this->_flags|=self::IS_BOLD;
89 89
 		else
90
-			$this->_flags &= ~self::IS_BOLD;
90
+			$this->_flags&=~self::IS_BOLD;
91 91
 	}
92 92
 
93 93
 	/**
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function setItalic($value)
105 105
 	{
106
-		$this->_flags |= self::IS_SET_ITALIC;
106
+		$this->_flags|=self::IS_SET_ITALIC;
107 107
 		if(TPropertyValue::ensureBoolean($value))
108
-			$this->_flags |= self::IS_ITALIC;
108
+			$this->_flags|=self::IS_ITALIC;
109 109
 		else
110
-			$this->_flags &= ~self::IS_ITALIC;
110
+			$this->_flags&=~self::IS_ITALIC;
111 111
 	}
112 112
 
113 113
 	/**
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
 	 */
124 124
 	public function setOverline($value)
125 125
 	{
126
-		$this->_flags |= self::IS_SET_OVERLINE;
126
+		$this->_flags|=self::IS_SET_OVERLINE;
127 127
 		if(TPropertyValue::ensureBoolean($value))
128
-			$this->_flags |= self::IS_OVERLINE;
128
+			$this->_flags|=self::IS_OVERLINE;
129 129
 		else
130
-			$this->_flags &= ~self::IS_OVERLINE;
130
+			$this->_flags&=~self::IS_OVERLINE;
131 131
 	}
132 132
 
133 133
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public function setSize($value)
145 145
 	{
146
-		$this->_flags |= self::IS_SET_SIZE;
146
+		$this->_flags|=self::IS_SET_SIZE;
147 147
 		$this->_size=$value;
148 148
 	}
149 149
 
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
 	 */
161 161
 	public function setStrikeout($value)
162 162
 	{
163
-		$this->_flags |= self::IS_SET_STRIKEOUT;
163
+		$this->_flags|=self::IS_SET_STRIKEOUT;
164 164
 		if(TPropertyValue::ensureBoolean($value))
165
-			$this->_flags |= self::IS_STRIKEOUT;
165
+			$this->_flags|=self::IS_STRIKEOUT;
166 166
 		else
167
-			$this->_flags &= ~self::IS_STRIKEOUT;
167
+			$this->_flags&=~self::IS_STRIKEOUT;
168 168
 	}
169 169
 
170 170
 	/**
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
 	 */
181 181
 	public function setUnderline($value)
182 182
 	{
183
-		$this->_flags |= self::IS_SET_UNDERLINE;
183
+		$this->_flags|=self::IS_SET_UNDERLINE;
184 184
 		if(TPropertyValue::ensureBoolean($value))
185
-			$this->_flags |= self::IS_UNDERLINE;
185
+			$this->_flags|=self::IS_UNDERLINE;
186 186
 		else
187
-			$this->_flags &= ~self::IS_UNDERLINE;
187
+			$this->_flags&=~self::IS_UNDERLINE;
188 188
 	}
189 189
 
190 190
 	/**
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public function setName($value)
202 202
 	{
203
-		$this->_flags |= self::IS_SET_NAME;
203
+		$this->_flags|=self::IS_SET_NAME;
204 204
 		$this->_name=$value;
205 205
 	}
206 206
 
@@ -283,9 +283,9 @@  discard block
 block discarded – undo
283 283
 			return '';
284 284
 		$str='';
285 285
 		if($this->_flags & self::IS_SET_BOLD)
286
-			$str.='font-weight:'.(($this->_flags & self::IS_BOLD)?'bold;':'normal;');
286
+			$str.='font-weight:'.(($this->_flags & self::IS_BOLD) ? 'bold;' : 'normal;');
287 287
 		if($this->_flags & self::IS_SET_ITALIC)
288
-			$str.='font-style:'.(($this->_flags & self::IS_ITALIC)?'italic;':'normal;');
288
+			$str.='font-style:'.(($this->_flags & self::IS_ITALIC) ? 'italic;' : 'normal;');
289 289
 		$textDec='';
290 290
 		if($this->_flags & self::IS_UNDERLINE)
291 291
 			$textDec.='underline';
@@ -312,9 +312,9 @@  discard block
 block discarded – undo
312 312
 		if($this->_flags===0)
313 313
 			return;
314 314
 		if($this->_flags & self::IS_SET_BOLD)
315
-			$writer->addStyleAttribute('font-weight',(($this->_flags & self::IS_BOLD)?'bold':'normal'));
315
+			$writer->addStyleAttribute('font-weight', (($this->_flags & self::IS_BOLD) ? 'bold' : 'normal'));
316 316
 		if($this->_flags & self::IS_SET_ITALIC)
317
-			$writer->addStyleAttribute('font-style',(($this->_flags & self::IS_ITALIC)?'italic':'normal'));
317
+			$writer->addStyleAttribute('font-style', (($this->_flags & self::IS_ITALIC) ? 'italic' : 'normal'));
318 318
 		$textDec='';
319 319
 		if($this->_flags & self::IS_UNDERLINE)
320 320
 			$textDec.='underline';
@@ -324,10 +324,10 @@  discard block
 block discarded – undo
324 324
 			$textDec.=' line-through';
325 325
 		$textDec=ltrim($textDec);
326 326
 		if($textDec!=='')
327
-			$writer->addStyleAttribute('text-decoration',$textDec);
327
+			$writer->addStyleAttribute('text-decoration', $textDec);
328 328
 		if($this->_size!=='')
329
-			$writer->addStyleAttribute('font-size',$this->_size);
329
+			$writer->addStyleAttribute('font-size', $this->_size);
330 330
 		if($this->_name!=='')
331
-			$writer->addStyleAttribute('font-family',$this->_name);
331
+			$writer->addStyleAttribute('font-family', $this->_name);
332 332
 	}
333 333
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TMultiView.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
 	 */
74 74
 	public function getActiveViewIndex()
75 75
 	{
76
-		if($this->_cachedActiveViewIndex>-1)
76
+		if($this->_cachedActiveViewIndex > -1)
77 77
 			return $this->_cachedActiveViewIndex;
78 78
 		else
79
-			return $this->getControlState('ActiveViewIndex',-1);
79
+			return $this->getControlState('ActiveViewIndex', -1);
80 80
 	}
81 81
 
82 82
 	/**
@@ -85,21 +85,21 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function setActiveViewIndex($value)
87 87
 	{
88
-		if(($index=TPropertyValue::ensureInteger($value))<0)
88
+		if(($index=TPropertyValue::ensureInteger($value)) < 0)
89 89
 			$index=-1;
90 90
 		$views=$this->getViews();
91 91
 		$count=$views->getCount();
92
-		if($count===0 && $this->getControlStage()<TControl::CS_CHILD_INITIALIZED)
92
+		if($count===0 && $this->getControlStage() < TControl::CS_CHILD_INITIALIZED)
93 93
 			$this->_cachedActiveViewIndex=$index;
94
-		else if($index<$count)
94
+		else if($index < $count)
95 95
 		{
96
-			$this->setControlState('ActiveViewIndex',$index,-1);
96
+			$this->setControlState('ActiveViewIndex', $index, -1);
97 97
 			$this->_cachedActiveViewIndex=-1;
98
-			if($index>=0)
99
-				$this->activateView($views->itemAt($index),true);
98
+			if($index >= 0)
99
+				$this->activateView($views->itemAt($index), true);
100 100
 		}
101 101
 		else
102
-			throw new TInvalidDataValueException('multiview_activeviewindex_invalid',$index);
102
+			throw new TInvalidDataValueException('multiview_activeviewindex_invalid', $index);
103 103
 	}
104 104
 
105 105
 	/**
@@ -110,13 +110,13 @@  discard block
 block discarded – undo
110 110
 	{
111 111
 		$index=$this->getActiveViewIndex();
112 112
 		$views=$this->getViews();
113
-		if($index>=$views->getCount())
114
-			throw new TInvalidDataValueException('multiview_activeviewindex_invalid',$index);
115
-		if($index<0)
113
+		if($index >= $views->getCount())
114
+			throw new TInvalidDataValueException('multiview_activeviewindex_invalid', $index);
115
+		if($index < 0)
116 116
 			return null;
117 117
 		$view=$views->itemAt($index);
118 118
 		if(!$view->getActive())
119
-			$this->activateView($view,false);
119
+			$this->activateView($view, false);
120 120
 		return $view;
121 121
 	}
122 122
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 */
127 127
 	public function setActiveView($view)
128 128
 	{
129
-		if(($index=$this->getViews()->indexOf($view))>=0)
129
+		if(($index=$this->getViews()->indexOf($view)) >= 0)
130 130
 			$this->setActiveViewIndex($index);
131 131
 		else
132 132
 			throw new TInvalidOperationException('multiview_view_inexistent');
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
 	 * @param TView the view to be activated
139 139
 	 * @param boolean whether to trigger OnActiveViewChanged event.
140 140
 	 */
141
-	protected function activateView($view,$triggerViewChangedEvent=true)
141
+	protected function activateView($view, $triggerViewChangedEvent=true)
142 142
 	{
143 143
 		if($view->getActive())
144 144
 			return;
145
-		$triggerEvent=$triggerViewChangedEvent && ($this->getControlStage()>=TControl::CS_STATE_LOADED || ($this->getPage() && !$this->getPage()->getIsPostBack()));
145
+		$triggerEvent=$triggerViewChangedEvent && ($this->getControlStage() >= TControl::CS_STATE_LOADED || ($this->getPage() && !$this->getPage()->getIsPostBack()));
146 146
 		foreach($this->getViews() as $v)
147 147
 		{
148 148
 			if($v===$view)
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 	public function onInit($param)
190 190
 	{
191 191
 		parent::onInit($param);
192
-		if($this->_cachedActiveViewIndex>=0)
192
+		if($this->_cachedActiveViewIndex >= 0)
193 193
 			$this->setActiveViewIndex($this->_cachedActiveViewIndex);
194 194
 	}
195 195
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public function onActiveViewChanged($param)
202 202
 	{
203
-		$this->raiseEvent('OnActiveViewChanged',$this,$param);
203
+		$this->raiseEvent('OnActiveViewChanged', $this, $param);
204 204
 	}
205 205
 
206 206
 	/**
@@ -210,21 +210,21 @@  discard block
 block discarded – undo
210 210
 	 * @param mixed event parameter
211 211
 	 * @return boolean whether this event is handled
212 212
 	 */
213
-	public function bubbleEvent($sender,$param)
213
+	public function bubbleEvent($sender, $param)
214 214
 	{
215 215
 		if(!$this->_ignoreBubbleEvents && ($param instanceof TCommandEventParameter))
216 216
 		{
217 217
 			switch($param->getCommandName())
218 218
 			{
219 219
 				case self::CMD_NEXTVIEW:
220
-					if(($index=$this->getActiveViewIndex())<$this->getViews()->getCount()-1)
221
-						$this->setActiveViewIndex($index+1);
220
+					if(($index=$this->getActiveViewIndex()) < $this->getViews()->getCount() - 1)
221
+						$this->setActiveViewIndex($index + 1);
222 222
 					else
223 223
 						$this->setActiveViewIndex(-1);
224 224
 					return true;
225 225
 				case self::CMD_PREVIOUSVIEW:
226
-					if(($index=$this->getActiveViewIndex())>=0)
227
-						$this->setActiveViewIndex($index-1);
226
+					if(($index=$this->getActiveViewIndex()) >= 0)
227
+						$this->setActiveViewIndex($index - 1);
228 228
 					return true;
229 229
 				case self::CMD_SWITCHVIEWID:
230 230
 					$view=$this->findControl($viewID=$param->getCommandParameter());
@@ -283,10 +283,10 @@  discard block
 block discarded – undo
283 283
 	 * @param mixed new item
284 284
 	 * @throws TInvalidDataTypeException if the item to be inserted is neither a string nor a TControl.
285 285
 	 */
286
-	public function insertAt($index,$item)
286
+	public function insertAt($index, $item)
287 287
 	{
288 288
 		if($item instanceof TView)
289
-			parent::insertAt($index,$item);
289
+			parent::insertAt($index, $item);
290 290
 		else
291 291
 			throw new TInvalidDataTypeException('viewcollection_view_required');
292 292
 	}
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 	 */
318 318
 	public function onActivate($param)
319 319
 	{
320
-		$this->raiseEvent('OnActivate',$this,$param);
320
+		$this->raiseEvent('OnActivate', $this, $param);
321 321
 	}
322 322
 
323 323
 	/**
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 	 */
327 327
 	public function onDeactivate($param)
328 328
 	{
329
-		$this->raiseEvent('OnDeactivate',$this,$param);
329
+		$this->raiseEvent('OnDeactivate', $this, $param);
330 330
 	}
331 331
 
332 332
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TImageButton.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function getEnableClientScript()
81 81
 	{
82
-		return $this->getViewState('EnableClientScript',true);
82
+		return $this->getViewState('EnableClientScript', true);
83 83
 	}
84 84
 
85 85
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function setEnableClientScript($value)
89 89
 	{
90
-		$this->setViewState('EnableClientScript',TPropertyValue::ensureBoolean($value),true);
90
+		$this->setViewState('EnableClientScript', TPropertyValue::ensureBoolean($value), true);
91 91
 	}
92 92
 
93 93
 	/**
@@ -99,16 +99,16 @@  discard block
 block discarded – undo
99 99
 	{
100 100
 		$page=$this->getPage();
101 101
 		$page->ensureRenderInForm($this);
102
-		$writer->addAttribute('type','image');
102
+		$writer->addAttribute('type', 'image');
103 103
 		if(($uniqueID=$this->getUniqueID())!=='')
104
-			$writer->addAttribute('name',$uniqueID);
104
+			$writer->addAttribute('name', $uniqueID);
105 105
 		if($this->getEnabled(true))
106 106
 		{
107 107
 			if($this->getEnableClientScript() && $this->needPostBackScript())
108 108
 				$this->renderClientControlScript($writer);
109 109
 		}
110 110
 		else if($this->getEnabled()) // in this case, parent will not render 'disabled'
111
-			$writer->addAttribute('disabled','disabled');
111
+			$writer->addAttribute('disabled', 'disabled');
112 112
 		parent::addAttributesToRender($writer);
113 113
 	}
114 114
 
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	protected function renderClientControlScript($writer)
119 119
 	{
120
-		$writer->addAttribute('id',$this->getClientID());
121
-		$cs = $this->getPage()->getClientScript();
122
-		$cs->registerPostBackControl($this->getClientClassName(),$this->getPostBackOptions());
120
+		$writer->addAttribute('id', $this->getClientID());
121
+		$cs=$this->getPage()->getClientScript();
122
+		$cs->registerPostBackControl($this->getClientClassName(), $this->getPostBackOptions());
123 123
 	}
124 124
 
125 125
 	/**
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 		if($this->getCausesValidation())
141 141
 		{
142 142
 			$group=$this->getValidationGroup();
143
-			return $this->getPage()->getValidators($group)->getCount()>0;
143
+			return $this->getPage()->getValidators($group)->getCount() > 0;
144 144
 		}
145 145
 		else
146 146
 			return false;
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public function setIsDefaultButton($value)
153 153
 	{
154
-		$this->setViewState('IsDefaultButton', TPropertyValue::ensureBoolean($value),false);
154
+		$this->setViewState('IsDefaultButton', TPropertyValue::ensureBoolean($value), false);
155 155
 	}
156 156
 
157 157
 	/**
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	protected function getPostBackOptions()
179 179
 	{
180
-		$options['ID'] = $this->getClientID();
181
-		$options['CausesValidation'] = $this->getCausesValidation();
182
-		$options['ValidationGroup'] = $this->getValidationGroup();
183
-		$options['EventTarget'] = $this->getUniqueID();
180
+		$options['ID']=$this->getClientID();
181
+		$options['CausesValidation']=$this->getCausesValidation();
182
+		$options['ValidationGroup']=$this->getValidationGroup();
183
+		$options['EventTarget']=$this->getUniqueID();
184 184
 
185 185
 		return $options;
186 186
 	}
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 * @param array the input data collection
193 193
 	 * @return boolean whether the data of the component has been changed
194 194
 	 */
195
-	public function loadPostData($key,$values)
195
+	public function loadPostData($key, $values)
196 196
 	{
197 197
 		$uid=$this->getUniqueID();
198 198
 		if(isset($values["{$uid}_x"]) && isset($values["{$uid}_y"]))
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 	 */
224 224
 	public function onClick($param)
225 225
 	{
226
-		$this->raiseEvent('OnClick',$this,$param);
226
+		$this->raiseEvent('OnClick', $this, $param);
227 227
 	}
228 228
 
229 229
 	/**
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
 	 */
236 236
 	public function onCommand($param)
237 237
 	{
238
-		$this->raiseEvent('OnCommand',$this,$param);
239
-		$this->raiseBubbleEvent($this,$param);
238
+		$this->raiseEvent('OnCommand', $this, $param);
239
+		$this->raiseBubbleEvent($this, $param);
240 240
 	}
241 241
 
242 242
 	/**
@@ -252,8 +252,8 @@  discard block
 block discarded – undo
252 252
 	{
253 253
 		if($this->getCausesValidation())
254 254
 			$this->getPage()->validate($this->getValidationGroup());
255
-		$this->onClick(new TImageClickEventParameter($this->_x,$this->_y));
256
-		$this->onCommand(new TCommandEventParameter($this->getCommandName(),$this->getCommandParameter()));
255
+		$this->onClick(new TImageClickEventParameter($this->_x, $this->_y));
256
+		$this->onCommand(new TCommandEventParameter($this->getCommandName(), $this->getCommandParameter()));
257 257
 	}
258 258
 
259 259
 	/**
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 	 */
272 272
 	public function getCausesValidation()
273 273
 	{
274
-		return $this->getViewState('CausesValidation',true);
274
+		return $this->getViewState('CausesValidation', true);
275 275
 	}
276 276
 
277 277
 	/**
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 	 */
280 280
 	public function setCausesValidation($value)
281 281
 	{
282
-		$this->setViewState('CausesValidation',TPropertyValue::ensureBoolean($value),true);
282
+		$this->setViewState('CausesValidation', TPropertyValue::ensureBoolean($value), true);
283 283
 	}
284 284
 
285 285
 	/**
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	 */
288 288
 	public function getCommandName()
289 289
 	{
290
-		return $this->getViewState('CommandName','');
290
+		return $this->getViewState('CommandName', '');
291 291
 	}
292 292
 
293 293
 	/**
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 	 */
296 296
 	public function setCommandName($value)
297 297
 	{
298
-		$this->setViewState('CommandName',$value,'');
298
+		$this->setViewState('CommandName', $value, '');
299 299
 	}
300 300
 
301 301
 	/**
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 	 */
304 304
 	public function getCommandParameter()
305 305
 	{
306
-		return $this->getViewState('CommandParameter','');
306
+		return $this->getViewState('CommandParameter', '');
307 307
 	}
308 308
 
309 309
 	/**
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 	 */
312 312
 	public function setCommandParameter($value)
313 313
 	{
314
-		$this->setViewState('CommandParameter',$value,'');
314
+		$this->setViewState('CommandParameter', $value, '');
315 315
 	}
316 316
 
317 317
 	/**
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 	 */
320 320
 	public function getValidationGroup()
321 321
 	{
322
-		return $this->getViewState('ValidationGroup','');
322
+		return $this->getViewState('ValidationGroup', '');
323 323
 	}
324 324
 
325 325
 	/**
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 	 */
328 328
 	public function setValidationGroup($value)
329 329
 	{
330
-		$this->setViewState('ValidationGroup',$value,'');
330
+		$this->setViewState('ValidationGroup', $value, '');
331 331
 	}
332 332
 
333 333
 	/**
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 	 * @param integer X coordinate of the clicking point
398 398
 	 * @param integer Y coordinate of the clicking point
399 399
 	 */
400
-	public function __construct($x,$y)
400
+	public function __construct($x, $y)
401 401
 	{
402 402
 		$this->_x=$x;
403 403
 		$this->_y=$y;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TConditional.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,15 +76,15 @@
 block discarded – undo
76 76
 		}
77 77
 		catch(Exception $e)
78 78
 		{
79
-			throw new TInvalidDataValueException('conditional_condition_invalid',$this->_condition,$e->getMessage());
79
+			throw new TInvalidDataValueException('conditional_condition_invalid', $this->_condition, $e->getMessage());
80 80
 		}
81 81
 		if($result)
82 82
 		{
83 83
 			if($this->_trueTemplate)
84
-				$this->_trueTemplate->instantiateIn($this->getTemplateControl(),$this);
84
+				$this->_trueTemplate->instantiateIn($this->getTemplateControl(), $this);
85 85
 		}
86 86
 		else if($this->_falseTemplate)
87
-			$this->_falseTemplate->instantiateIn($this->getTemplateControl(),$this);
87
+			$this->_falseTemplate->instantiateIn($this->getTemplateControl(), $this);
88 88
 		$this->_creatingChildren=false;
89 89
 	}
90 90
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THiddenField.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -53,18 +53,18 @@  discard block
 block discarded – undo
53 53
 	{
54 54
 		$uniqueID=$this->getUniqueID();
55 55
 		$this->getPage()->ensureRenderInForm($this);
56
-		$writer->addAttribute('type','hidden');
56
+		$writer->addAttribute('type', 'hidden');
57 57
 		if($uniqueID!=='')
58
-			$writer->addAttribute('name',$uniqueID);
58
+			$writer->addAttribute('name', $uniqueID);
59 59
 		if($this->getID()!=='')
60
-			$writer->addAttribute('id',$this->getClientID());
60
+			$writer->addAttribute('id', $this->getClientID());
61 61
 		if(($value=$this->getValue())!=='')
62
-			$writer->addAttribute('value',$value);
62
+			$writer->addAttribute('value', $value);
63 63
 
64 64
 		if($this->getHasAttributes())
65 65
 		{
66 66
 			foreach($this->getAttributes() as $name=>$value)
67
-				$writer->addAttribute($name,$value);
67
+				$writer->addAttribute($name, $value);
68 68
 		}
69 69
 
70 70
 		$writer->renderBeginTag('input');
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 * @param array the input data collection
79 79
 	 * @return boolean whether the data of the component has been changed
80 80
 	 */
81
-	public function loadPostData($key,$values)
81
+	public function loadPostData($key, $values)
82 82
 	{
83 83
 		$value=$values[$key];
84 84
 		if($value===$this->getValue())
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 */
147 147
 	public function onValueChanged($param)
148 148
 	{
149
-		$this->raiseEvent('OnValueChanged',$this,$param);
149
+		$this->raiseEvent('OnValueChanged', $this, $param);
150 150
 	}
151 151
 
152 152
 	/**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	public function getValue()
156 156
 	{
157
-		return $this->getViewState('Value','');
157
+		return $this->getViewState('Value', '');
158 158
 	}
159 159
 
160 160
 	/**
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 */
164 164
 	public function setValue($value)
165 165
 	{
166
-		$this->setViewState('Value',$value,'');
166
+		$this->setViewState('Value', $value, '');
167 167
 	}
168 168
 
169 169
 	/**
Please login to merge, or discard this patch.