@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | */ |
42 | 42 | protected function renderCustomScriptFile($writer) |
43 | 43 | { |
44 | - if(($scriptUrl = $this->getScriptUrl())!=='') |
|
44 | + if(($scriptUrl=$this->getScriptUrl())!=='') |
|
45 | 45 | { |
46 | 46 | if($this->getPage()->getIsCallback()) |
47 | 47 | { |
48 | - $cs = $this->getPage()->getClientScript(); |
|
48 | + $cs=$this->getPage()->getClientScript(); |
|
49 | 49 | $uniqueid=$this->ClientID.'_custom'; |
50 | 50 | if(!$cs->isScriptFileRegistered($uniqueid)) |
51 | 51 | $cs->registerScriptFile($uniqueid, $scriptUrl); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | if($this->getPage()->getIsCallback()) |
67 | 67 | { |
68 | - $extWriter= $this->getPage()->getResponse()->createHtmlWriter(); |
|
68 | + $extWriter=$this->getPage()->getResponse()->createHtmlWriter(); |
|
69 | 69 | $extWriter->write("/*<![CDATA[*/\n"); |
70 | 70 | $this->renderChildren($extWriter); |
71 | 71 | $extWriter->write("\n/*]]>*/"); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function getClientSide() |
37 | 37 | { |
38 | 38 | if($this->_clientSide===null) |
39 | - $this->_clientSide = $this->createClientSide(); |
|
39 | + $this->_clientSide=$this->createClientSide(); |
|
40 | 40 | return $this->_clientSide; |
41 | 41 | } |
42 | 42 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | protected function createRepeatedControl() |
79 | 79 | { |
80 | - $control = new TActiveRadioButtonItem; |
|
80 | + $control=new TActiveRadioButtonItem; |
|
81 | 81 | $control->getAdapter()->setBaseActiveControl($this->getActiveControl()); |
82 | 82 | return $control; |
83 | 83 | } |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | * @param string checkbox id |
139 | 139 | * @param string onclick js |
140 | 140 | */ |
141 | - protected function renderInputTag($writer,$clientID,$onclick) |
|
141 | + protected function renderInputTag($writer, $clientID, $onclick) |
|
142 | 142 | { |
143 | - TRadioButton::renderInputTag($writer,$clientID,$onclick); |
|
143 | + TRadioButton::renderInputTag($writer, $clientID, $onclick); |
|
144 | 144 | } |
145 | 145 | } |
146 | 146 | \ No newline at end of file |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * TActiveRadioButtonList class file. |
|
4 | - * |
|
5 | - * @author Wei Zhuo <weizhuo[at]gamil[dot]com> |
|
6 | - * @link https://github.com/pradosoft/prado |
|
7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | - * @package System.Web.UI.ActiveControls |
|
10 | - */ |
|
3 | + * TActiveRadioButtonList class file. |
|
4 | + * |
|
5 | + * @author Wei Zhuo <weizhuo[at]gamil[dot]com> |
|
6 | + * @link https://github.com/pradosoft/prado |
|
7 | + * @copyright Copyright © 2005-2016 The PRADO Group |
|
8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | + * @package System.Web.UI.ActiveControls |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * Load active control adapter and active radio button. |
@@ -43,11 +43,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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().'-->'; |
@@ -47,8 +47,8 @@ |
||
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 | /** |
@@ -64,10 +64,10 @@ |
||
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 |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * TEventTriggeredCallback class file. |
|
4 | - * |
|
5 | - * @author Wei Zhuo <weizhuo[at]gamil[dot]com> |
|
6 | - * @link https://github.com/pradosoft/prado |
|
7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | - * @package System.Web.UI.ActiveControls |
|
10 | - */ |
|
3 | + * TEventTriggeredCallback class file. |
|
4 | + * |
|
5 | + * @author Wei Zhuo <weizhuo[at]gamil[dot]com> |
|
6 | + * @link https://github.com/pradosoft/prado |
|
7 | + * @copyright Copyright © 2005-2016 The PRADO Group |
|
8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | + * @package System.Web.UI.ActiveControls |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | Prado::using('System.Web.UI.ActiveControls.TTriggeredCallback'); |
13 | 13 |
@@ -45,7 +45,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -189,8 +189,7 @@ discard block |
||
189 | 189 | return file_put_contents($fileName,file_get_contents($this->_localName))!==false; |
190 | 190 | else |
191 | 191 | return false; |
192 | - } |
|
193 | - else |
|
192 | + } else |
|
194 | 193 | return false; |
195 | 194 | } |
196 | 195 | |
@@ -211,8 +210,7 @@ discard block |
||
211 | 210 | $this->_errorCode=$_FILES[$key]['error']; |
212 | 211 | $this->_localName=$_FILES[$key]['tmp_name']; |
213 | 212 | return $this->_dataChanged=true; |
214 | - } |
|
215 | - else |
|
213 | + } else |
|
216 | 214 | return false; |
217 | 215 | } |
218 | 216 |
@@ -62,12 +62,12 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function getTagName() |
39 | 39 | { |
40 | - return ($this->_tagName !== null) ? $this->_tagName : ($this->_tagName = $this->getDefaultTagName()); |
|
40 | + return ($this->_tagName!==null) ? $this->_tagName : ($this->_tagName=$this->getDefaultTagName()); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -61,6 +61,6 @@ discard block |
||
61 | 61 | * @return boolean true if TagName has deviated from the default. |
62 | 62 | */ |
63 | 63 | public function getIsMutated() { |
64 | - return $this->_tagName !== null && $this->_tagName != $this->getDefaultTagName(); |
|
64 | + return $this->_tagName!==null && $this->_tagName!=$this->getDefaultTagName(); |
|
65 | 65 | } |
66 | 66 | } |