Completed
Push — prado-3.3 ( f4da81...5dd4b5 )
by Fabio
09:03
created
framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 	 * @param string writer class name.
44 44
 	 * @param THttpResponse http response handler.
45 45
 	 */
46
-	public function createNewHtmlWriter($type,$response)
46
+	public function createNewHtmlWriter($type, $response)
47 47
 	{
48
-		$writer = new TCallbackResponseWriter();
49
-		$this->_writers[] = $writer;
50
-		return parent::createNewHtmlWriter($type,$writer);
48
+		$writer=new TCallbackResponseWriter();
49
+		$this->_writers[]=$writer;
50
+		return parent::createNewHtmlWriter($type, $writer);
51 51
 	}
52 52
 
53 53
 	/**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function setResponseData($data)
67 67
 	{
68
-		$this->_data = $data;
68
+		$this->_data=$data;
69 69
 	}
70 70
 
71 71
 	/**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	{
85 85
 		if($url[0]==='/')
86 86
 			$url=$this->getRequest()->getBaseUrl().$url;
87
-		$this->_redirectUrl=str_replace('&','&',$url);
87
+		$this->_redirectUrl=str_replace('&', '&', $url);
88 88
 	}
89 89
 
90 90
 	/**
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	public function __construct()
125 125
 	{
126 126
 	  	parent::__construct();
127
-		$this->_boundary = sprintf('%x',crc32(uniqid(null, true)));
127
+		$this->_boundary=sprintf('%x', crc32(uniqid(null, true)));
128 128
 	}
129 129
 
130 130
 	/**
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 */
141 141
 	public function setBoundary($value)
142 142
 	{
143
-		$this->_boundary = $value;
143
+		$this->_boundary=$value;
144 144
 	}
145 145
 
146 146
 	/**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	 */
151 151
 	public function flush()
152 152
 	{
153
-		$content = parent::flush();
153
+		$content=parent::flush();
154 154
 		if(empty($content))
155 155
 			return "";
156 156
 		return '<!--'.$this->getBoundary().'-->'.$content.'<!--//'.$this->getBoundary().'-->';
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackClientSide.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 	 */
265 265
 	public function setEnablePageStateUpdate($value)
266 266
 	{
267
-		$enabled = TPropertyValue::ensureBoolean($value);
267
+		$enabled=TPropertyValue::ensureBoolean($value);
268 268
 		$this->setOption('EnablePageStateUpdate', $enabled);
269 269
 	}
270 270
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 	 */
275 275
 	public function getEnablePageStateUpdate()
276 276
 	{
277
-		$option = $this->getOption('EnablePageStateUpdate');
277
+		$option=$this->getOption('EnablePageStateUpdate');
278 278
 		return ($option===null) ? true : $option;
279 279
 	}
280 280
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	public function setPostBackTarget($value)
293 293
 	{
294 294
 		if($value instanceof TControl)
295
-			$value = $value->getUniqueID();
295
+			$value=$value->getUniqueID();
296 296
 		$this->setOption('EventTarget', $value);
297 297
 	}
298 298
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveTableRow.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	public function raiseCallbackEvent($param)
103 103
 	{
104
-		$parameter = new TActiveTableRowEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getRowIndex());
104
+		$parameter=new TActiveTableRowEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getRowIndex());
105 105
 		$this->onRowSelected($parameter);
106 106
 	}
107 107
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 	public function bubbleEvent($sender, $param)
117 117
 	{
118
-		if ($param instanceof TActiveTableCellEventParameter)
118
+		if($param instanceof TActiveTableCellEventParameter)
119 119
 		{
120 120
 			$this->raiseCallbackEvent($param);
121 121
 			return true;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	{
146 146
 		parent::addAttributesToRender($writer);
147 147
 		$writer->addAttribute('id', $this->getClientID());
148
-		if ($this->hasEventHandler('OnRowSelected'))
148
+		if($this->hasEventHandler('OnRowSelected'))
149 149
 			$this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions());
150 150
 	}
151 151
 
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
 	 */
159 159
 	public function render($writer)
160 160
 	{
161
-		if ($this->getHasPreRendered())
161
+		if($this->getHasPreRendered())
162 162
 		{
163 163
 			parent::render($writer);
164
-			if ($this->getActiveControl()->canUpdateClientSide())
164
+			if($this->getActiveControl()->canUpdateClientSide())
165 165
 				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
166 166
 		}
167 167
 		else
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
 			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
170 170
 			// If we update a TActiveTableRow on callback, we shouldn't update all childs,
171 171
 			// because the whole content will be replaced by the parent.
172
-			if ($this->getHasControls())
172
+			if($this->getHasControls())
173 173
 			{
174
-				foreach ($this->findControlsByType('IActiveControl', false) as $control)
174
+				foreach($this->findControlsByType('IActiveControl', false) as $control)
175 175
 					$control->getActiveControl()->setEnableUpdate(false);
176 176
 			}
177 177
 		}
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	protected function getPostBackOptions()
186 186
 	{
187
-		$options['ID'] = $this->getClientID();
188
-		$options['EventTarget'] = $this->getUniqueID();
187
+		$options['ID']=$this->getClientID();
188
+		$options['EventTarget']=$this->getUniqueID();
189 189
 		return $options;
190 190
 	}
191 191
 
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	public function getRowIndex()
199 199
 	{
200
-		foreach ($this->getTable()->getRows() as $key => $row)
201
-			if ($row == $this) return $key;
200
+		foreach($this->getTable()->getRows() as $key => $row)
201
+			if($row==$this) return $key;
202 202
 		throw new TConfigurationException('tactivetablerow_control_notincollection', get_class($this), $this->getUniqueID());
203 203
 	}
204 204
 
@@ -209,14 +209,14 @@  discard block
 block discarded – undo
209 209
 	 */
210 210
 	public function getTable()
211 211
 	{
212
-		if ($this->_table === null)
212
+		if($this->_table===null)
213 213
 		{
214
-			$table = $this->getParent();
215
-			while (!($table instanceof TTable) && $table !== null)
214
+			$table=$this->getParent();
215
+			while(!($table instanceof TTable) && $table!==null)
216 216
 			{
217
-				$table = $table->getParent();
217
+				$table=$table->getParent();
218 218
 			}
219
-			if ($table instanceof TTable) $this->_table = $table;
219
+			if($table instanceof TTable) $this->_table=$table;
220 220
 			else throw new TConfigurationException('tactivetablerow_control_outoftable', get_class($this), $this->getUniqueID());
221 221
 		}
222 222
 		return $this->_table;
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 	/**
247 247
 	* @var integer the zero-based index of the row.
248 248
 	*/
249
-	private $_selectedRowIndex = -1;
249
+	private $_selectedRowIndex=-1;
250 250
 
251 251
 	/**
252 252
 	 * Creates a new TActiveTableRowEventParameter.
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 	public function __construct($response, $parameter, $index=-1)
255 255
 	{
256 256
 		parent::__construct($response, $parameter);
257
-		$this->_selectedRowIndex = $index;
257
+		$this->_selectedRowIndex=$index;
258 258
 	}
259 259
 
260 260
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackEventParameter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@
 block discarded – undo
47 47
 	 */
48 48
 	public function __construct($response, $parameter)
49 49
 	{
50
-		$this->_response = $response;
51
-		$this->_parameter = $parameter;
50
+		$this->_response=$response;
51
+		$this->_parameter=$parameter;
52 52
 	}
53 53
 
54 54
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDataList.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     parent::setDataSource($value);
56 56
     if($this->getActiveControl()->canUpdateClientSide()) {
57 57
       $this->renderPager();
58
-      $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter());
58
+      $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
59 59
     }
60 60
   }
61 61
 
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
   {
79 79
     if($this->getHasPreRendered()) {
80 80
       $this->renderDataList($writer);
81
-      if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer);
81
+      if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer);
82 82
     }
83 83
     else {
84
-      $this->getPage()->getAdapter()->registerControlToRender($this,$writer);
84
+      $this->getPage()->getAdapter()->registerControlToRender($this, $writer);
85 85
     }
86 86
   }
87 87
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     {
98 98
       if($item->ControlToPaginate==$this->ID) {
99 99
         $writer=$this->getResponse()->createHtmlWriter();
100
-        $this->getPage()->getAdapter()->registerControlToRender($item,$writer);
100
+        $this->getPage()->getAdapter()->registerControlToRender($item, $writer);
101 101
       }
102 102
     }
103 103
   }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActivePager.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
 		);
95 95
 
96 96
 		$this->getControls()->add($list);
97
-		$list->setDataSource(range(1,$this->getPageCount()));
97
+		$list->setDataSource(range(1, $this->getPageCount()));
98 98
 		$list->dataBind();
99 99
 		$list->setSelectedIndex($this->getCurrentPageIndex());
100 100
 		$list->setAutoPostBack(true);
101
-		$list->attachEventHandler('OnSelectedIndexChanged',array($this,'listIndexChanged'));
101
+		$list->attachEventHandler('OnSelectedIndexChanged', array($this, 'listIndexChanged'));
102 102
 		$list->attachEventHandler('OnCallback', array($this, 'handleCallback'));
103 103
 	}
104 104
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 * @param string CommandParameter corresponding to the OnCommand event of the button
115 115
 	 * @return mixed the button instance
116 116
 	 */
117
-	protected function createPagerButton($buttonType,$enabled,$text,$commandName,$commandParameter)
117
+	protected function createPagerButton($buttonType, $enabled, $text, $commandName, $commandParameter)
118 118
 	{
119 119
 		if($buttonType===TPagerButtonType::LinkButton)
120 120
 		{
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
 		}
131 131
 		else if($buttonType===TPagerButtonType::ImageButton)
132 132
 		{
133
-			$button = new TActiveImageButton;
134
-			$button->setImageUrl($this->getPageImageUrl($text,$commandName));
133
+			$button=new TActiveImageButton;
134
+			$button->setImageUrl($this->getPageImageUrl($text, $commandName));
135 135
 			if($enabled)
136
-				$button->Visible = true;
136
+				$button->Visible=true;
137 137
 			else
138
-				$button->Visible = false;
138
+				$button->Visible=false;
139 139
 		}
140 140
 		else
141 141
 		{
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
 		if($buttonType===TPagerButtonType::ImageButton)
148 148
 		{
149
-			$button->ImageUrl = $text;
149
+			$button->ImageUrl=$text;
150 150
 		}
151 151
 
152 152
 		$button->setText($text);
@@ -170,14 +170,14 @@  discard block
 block discarded – undo
170 170
 	 * @param mixed $sender
171 171
 	 * @param TCallbackEventParameter $param
172 172
 	 */
173
-	public function handleCallback ($sender,$param)
173
+	public function handleCallback($sender, $param)
174 174
 	{
175 175
 		// Update all the buttons pagers attached to the same control.
176 176
 		// Dropdown pagers doesn't need to be re-rendered.
177 177
 		$controlToPaginate=$this->getControlToPaginate();
178
-		foreach ($this->getNamingContainer()->findControlsByType('TActivePager', false) as $control)
178
+		foreach($this->getNamingContainer()->findControlsByType('TActivePager', false) as $control)
179 179
 		{
180
-			if ($control->getMode() !== TPagerMode::DropDownList && $control->getControlToPaginate()===$controlToPaginate)
180
+			if($control->getMode()!==TPagerMode::DropDownList && $control->getControlToPaginate()===$controlToPaginate)
181 181
 			{
182 182
 				$control->render($param->getNewWriter());
183 183
 				// FIXME : With some very fast machine, the getNewWriter() consecutive calls are in the same microsecond, resulting
@@ -189,18 +189,18 @@  discard block
 block discarded – undo
189 189
 		$this->onCallback($param);
190 190
 	}
191 191
 
192
-	public function render ($writer)
192
+	public function render($writer)
193 193
 	{
194 194
 		if($this->getHasPreRendered())
195 195
 		{
196
-			$this->setDisplay(($this->getPageCount()==1)?TDisplayStyle::None:TDisplayStyle::Dynamic);
196
+			$this->setDisplay(($this->getPageCount()==1) ? TDisplayStyle::None : TDisplayStyle::Dynamic);
197 197
 			TWebControl::render($writer);
198 198
 			if($this->getActiveControl()->canUpdateClientSide())
199
-				$this->getPage()->getCallbackClient()->replaceContent($this,$writer);
199
+				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
200 200
 		}
201 201
 		else
202 202
 		{
203
-			$this->getPage()->getAdapter()->registerControlToRender($this,$writer);
203
+			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
204 204
 		}
205 205
 	}
206 206
 }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveMultiView.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
 		if($this->getHasPreRendered()) {
68 68
 			$this->renderMultiView($writer);
69 69
 			if($this->getActiveControl()->canUpdateClientSide())
70
-				$this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer);
70
+				$this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer);
71 71
 		}
72 72
 		else
73
-			$this->getPage()->getAdapter()->registerControlToRender($this,$writer);
73
+			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
74 74
 	}
75 75
 
76 76
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 		$old=parent::getActiveViewIndex();
96 96
 		parent::setActiveViewIndex($value);
97 97
 		if($this->getActiveControl()->canUpdateClientSide() && $old!=$value)
98
-			$this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter());
98
+			$this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
99 99
 	}
100 100
 
101 101
 	/**
@@ -107,6 +107,6 @@  discard block
 block discarded – undo
107 107
 		$old=parent::getActiveView();
108 108
 		parent::setActiveView($value);
109 109
 		if($this->getActiveControl()->canUpdateClientSide() && $old!=$value)
110
-			$this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter());
110
+			$this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
111 111
 	}
112 112
 }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TEventTriggeredCallback.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@
 block discarded – undo
64 64
 	 */
65 65
 	protected function getTriggerOptions()
66 66
 	{
67
-		$options = parent::getTriggerOptions();
68
-		$name = preg_replace('/^on/', '', $this->getEventName());
69
-		$options['EventName'] = strtolower($name);
70
-		$options['StopEvent'] = $this->getPreventDefaultAction();
67
+		$options=parent::getTriggerOptions();
68
+		$name=preg_replace('/^on/', '', $this->getEventName());
69
+		$options['EventName']=strtolower($name);
70
+		$options['StopEvent']=$this->getPreventDefaultAction();
71 71
 		return $options;
72 72
 	}
73 73
 
Please login to merge, or discard this patch.
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.