@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | /** |
| 29 | 29 | * @var string domain of the cookie |
| 30 | 30 | */ |
| 31 | - private $_domain = ''; |
|
| 31 | + private $_domain=''; |
|
| 32 | 32 | /** |
| 33 | 33 | * @var string name of the cookie |
| 34 | 34 | */ |
@@ -36,23 +36,23 @@ discard block |
||
| 36 | 36 | /** |
| 37 | 37 | * @var string value of the cookie |
| 38 | 38 | */ |
| 39 | - private $_value = ''; |
|
| 39 | + private $_value=''; |
|
| 40 | 40 | /** |
| 41 | 41 | * @var integer expire of the cookie |
| 42 | 42 | */ |
| 43 | - private $_expire = 0; |
|
| 43 | + private $_expire=0; |
|
| 44 | 44 | /** |
| 45 | 45 | * @var string path of the cookie |
| 46 | 46 | */ |
| 47 | - private $_path = '/'; |
|
| 47 | + private $_path='/'; |
|
| 48 | 48 | /** |
| 49 | 49 | * @var boolean whether cookie should be sent via secure connection |
| 50 | 50 | */ |
| 51 | - private $_secure = false; |
|
| 51 | + private $_secure=false; |
|
| 52 | 52 | /** |
| 53 | 53 | * @var boolean if true the cookie value will be unavailable to JavaScript |
| 54 | 54 | */ |
| 55 | - private $_httpOnly = false; |
|
| 55 | + private $_httpOnly=false; |
|
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | 58 | * Constructor. |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public function __construct($name, $value) |
| 63 | 63 | { |
| 64 | - $this->_name = $name; |
|
| 65 | - $this->_value = $value; |
|
| 64 | + $this->_name=$name; |
|
| 65 | + $this->_value=$value; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function setDomain($value) |
| 80 | 80 | { |
| 81 | - $this->_domain = $value; |
|
| 81 | + $this->_domain=$value; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public function setExpire($value) |
| 96 | 96 | { |
| 97 | - $this->_expire = TPropertyValue::ensureInteger($value); |
|
| 97 | + $this->_expire=TPropertyValue::ensureInteger($value); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | public function setHttpOnly($value) |
| 112 | 112 | { |
| 113 | - $this->_httpOnly = TPropertyValue::ensureBoolean($value); |
|
| 113 | + $this->_httpOnly=TPropertyValue::ensureBoolean($value); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | */ |
| 127 | 127 | public function setName($value) |
| 128 | 128 | { |
| 129 | - $this->_name = $value; |
|
| 129 | + $this->_name=$value; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | public function setValue($value) |
| 144 | 144 | { |
| 145 | - $this->_value = $value; |
|
| 145 | + $this->_value=$value; |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /** |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | public function setPath($value) |
| 160 | 160 | { |
| 161 | - $this->_path = $value; |
|
| 161 | + $this->_path=$value; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /** |
@@ -174,6 +174,6 @@ discard block |
||
| 174 | 174 | */ |
| 175 | 175 | public function setSecure($value) |
| 176 | 176 | { |
| 177 | - $this->_secure = TPropertyValue::ensureBoolean($value); |
|
| 177 | + $this->_secure=TPropertyValue::ensureBoolean($value); |
|
| 178 | 178 | } |
| 179 | 179 | } |
| 180 | 180 | \ No newline at end of file |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public static function renderScriptFiles($files) |
| 35 | 35 | { |
| 36 | - $str = ''; |
|
| 36 | + $str=''; |
|
| 37 | 37 | foreach($files as $file) |
| 38 | - $str .= self::renderScriptFile($file); |
|
| 38 | + $str.=self::renderScriptFile($file); |
|
| 39 | 39 | return $str; |
| 40 | 40 | } |
| 41 | 41 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public static function renderScriptFile($file) |
| 48 | 48 | { |
| 49 | - return '<script type="text/javascript" src="' . THttpUtility::htmlEncode($file) . "\"></script>\n"; |
|
| 49 | + return '<script type="text/javascript" src="'.THttpUtility::htmlEncode($file)."\"></script>\n"; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | public static function renderScriptBlocks($scripts) |
| 58 | 58 | { |
| 59 | 59 | if(count($scripts)) |
| 60 | - return "<script type=\"text/javascript\">\n/*<![CDATA[*/\n" . implode("\n", $scripts) . "\n/*]]>*/\n</script>\n"; |
|
| 60 | + return "<script type=\"text/javascript\">\n/*<![CDATA[*/\n".implode("\n", $scripts)."\n/*]]>*/\n</script>\n"; |
|
| 61 | 61 | else |
| 62 | 62 | return ''; |
| 63 | 63 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | public static function renderScriptBlocksCallback($scripts) |
| 71 | 71 | { |
| 72 | 72 | if(count($scripts)) |
| 73 | - return implode("\n", $scripts) . "\n"; |
|
| 73 | + return implode("\n", $scripts)."\n"; |
|
| 74 | 74 | else |
| 75 | 75 | return ''; |
| 76 | 76 | } |
@@ -139,40 +139,40 @@ discard block |
||
| 139 | 139 | * @param boolean wether to encode empty strings too. Default to false for BC. |
| 140 | 140 | * @return string the encoded string |
| 141 | 141 | */ |
| 142 | - public static function encode($value, $toMap = true, $encodeEmptyStrings = false) |
|
| 142 | + public static function encode($value, $toMap=true, $encodeEmptyStrings=false) |
|
| 143 | 143 | { |
| 144 | 144 | if(is_string($value)) |
| 145 | 145 | return self::quoteString($value); |
| 146 | 146 | elseif(is_bool($value)) |
| 147 | - return $value?'true':'false'; |
|
| 147 | + return $value ? 'true' : 'false'; |
|
| 148 | 148 | elseif(is_array($value)) |
| 149 | 149 | { |
| 150 | - $results = ''; |
|
| 151 | - if(($n = count($value)) > 0 && array_keys($value) !== range(0, $n - 1)) |
|
| 150 | + $results=''; |
|
| 151 | + if(($n=count($value)) > 0 && array_keys($value)!==range(0, $n - 1)) |
|
| 152 | 152 | { |
| 153 | 153 | foreach($value as $k => $v) |
| 154 | 154 | { |
| 155 | - if($v !== '' || $encodeEmptyStrings) |
|
| 155 | + if($v!=='' || $encodeEmptyStrings) |
|
| 156 | 156 | { |
| 157 | - if($results !== '') |
|
| 158 | - $results .= ','; |
|
| 159 | - $results .= "'$k':" . self::encode($v, $toMap, $encodeEmptyStrings); |
|
| 157 | + if($results!=='') |
|
| 158 | + $results.=','; |
|
| 159 | + $results.="'$k':".self::encode($v, $toMap, $encodeEmptyStrings); |
|
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | - return '{' . $results . '}'; |
|
| 162 | + return '{'.$results.'}'; |
|
| 163 | 163 | } |
| 164 | 164 | else |
| 165 | 165 | { |
| 166 | 166 | foreach($value as $v) |
| 167 | 167 | { |
| 168 | - if($v !== '' || $encodeEmptyStrings) |
|
| 168 | + if($v!=='' || $encodeEmptyStrings) |
|
| 169 | 169 | { |
| 170 | - if($results !== '') |
|
| 171 | - $results .= ','; |
|
| 172 | - $results .= self::encode($v, $toMap, $encodeEmptyStrings); |
|
| 170 | + if($results!=='') |
|
| 171 | + $results.=','; |
|
| 172 | + $results.=self::encode($v, $toMap, $encodeEmptyStrings); |
|
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | - return '[' . $results . ']'; |
|
| 175 | + return '['.$results.']'; |
|
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | elseif(is_int($value)) |
@@ -188,8 +188,8 @@ discard block |
||
| 188 | 188 | return 'Number.POSITIVE_INFINITY'; |
| 189 | 189 | break; |
| 190 | 190 | default: |
| 191 | - $locale = localeConv(); |
|
| 192 | - if($locale['decimal_point'] == '.') |
|
| 191 | + $locale=localeConv(); |
|
| 192 | + if($locale['decimal_point']=='.') |
|
| 193 | 193 | return "$value"; |
| 194 | 194 | else |
| 195 | 195 | return str_replace($locale['decimal_point'], '.', "$value"); |
@@ -197,11 +197,11 @@ discard block |
||
| 197 | 197 | } |
| 198 | 198 | } |
| 199 | 199 | elseif(is_object($value)) |
| 200 | - if ($value instanceof TJavaScriptLiteral) |
|
| 200 | + if($value instanceof TJavaScriptLiteral) |
|
| 201 | 201 | return $value->toJavaScriptLiteral(); |
| 202 | 202 | else |
| 203 | 203 | return self::encode(get_object_vars($value), $toMap); |
| 204 | - elseif($value === null) |
|
| 204 | + elseif($value===null) |
|
| 205 | 205 | return 'null'; |
| 206 | 206 | else |
| 207 | 207 | return ''; |
@@ -212,14 +212,14 @@ discard block |
||
| 212 | 212 | * @param mixed variable to be encoded |
| 213 | 213 | * @return string encoded string |
| 214 | 214 | */ |
| 215 | - public static function jsonEncode($value, $options = 0) |
|
| 215 | + public static function jsonEncode($value, $options=0) |
|
| 216 | 216 | { |
| 217 | - if (($g = Prado::getApplication()->getGlobalization(false)) !== null && |
|
| 218 | - strtoupper($enc = $g->getCharset()) != 'UTF-8') { |
|
| 217 | + if(($g=Prado::getApplication()->getGlobalization(false))!==null && |
|
| 218 | + strtoupper($enc=$g->getCharset())!='UTF-8') { |
|
| 219 | 219 | self::convertToUtf8($value, $enc); |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | - $s = @json_encode($value, $options); |
|
| 222 | + $s=@json_encode($value, $options); |
|
| 223 | 223 | self::checkJsonError(); |
| 224 | 224 | return $s; |
| 225 | 225 | } |
@@ -231,8 +231,8 @@ discard block |
||
| 231 | 231 | */ |
| 232 | 232 | private static function convertToUtf8(&$value, $sourceEncoding) { |
| 233 | 233 | if(is_string($value)) |
| 234 | - $value = iconv($sourceEncoding, 'UTF-8', $value); |
|
| 235 | - elseif (is_array($value)) |
|
| 234 | + $value=iconv($sourceEncoding, 'UTF-8', $value); |
|
| 235 | + elseif(is_array($value)) |
|
| 236 | 236 | { |
| 237 | 237 | foreach($value as &$element) |
| 238 | 238 | self::convertToUtf8($element, $sourceEncoding); |
@@ -247,37 +247,37 @@ discard block |
||
| 247 | 247 | * @param int recursion depth |
| 248 | 248 | * @return mixed decoded variable |
| 249 | 249 | */ |
| 250 | - public static function jsonDecode($value, $assoc = false, $depth = 512) |
|
| 250 | + public static function jsonDecode($value, $assoc=false, $depth=512) |
|
| 251 | 251 | { |
| 252 | - $s = @json_decode($value, $assoc, $depth); |
|
| 252 | + $s=@json_decode($value, $assoc, $depth); |
|
| 253 | 253 | self::checkJsonError(); |
| 254 | 254 | return $s; |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | private static function checkJsonError() |
| 258 | 258 | { |
| 259 | - switch ($err = json_last_error()) |
|
| 259 | + switch($err=json_last_error()) |
|
| 260 | 260 | { |
| 261 | 261 | case JSON_ERROR_NONE: |
| 262 | 262 | return; |
| 263 | 263 | break; |
| 264 | 264 | case JSON_ERROR_DEPTH: |
| 265 | - $msg = 'Maximum stack depth exceeded'; |
|
| 265 | + $msg='Maximum stack depth exceeded'; |
|
| 266 | 266 | break; |
| 267 | 267 | case JSON_ERROR_STATE_MISMATCH: |
| 268 | - $msg = 'Underflow or the modes mismatch'; |
|
| 268 | + $msg='Underflow or the modes mismatch'; |
|
| 269 | 269 | break; |
| 270 | 270 | case JSON_ERROR_CTRL_CHAR: |
| 271 | - $msg = 'Unexpected control character found'; |
|
| 271 | + $msg='Unexpected control character found'; |
|
| 272 | 272 | break; |
| 273 | 273 | case JSON_ERROR_SYNTAX: |
| 274 | - $msg = 'Syntax error, malformed JSON'; |
|
| 274 | + $msg='Syntax error, malformed JSON'; |
|
| 275 | 275 | break; |
| 276 | 276 | case JSON_ERROR_UTF8: |
| 277 | - $msg = 'Malformed UTF-8 characters, possibly incorrectly encoded'; |
|
| 277 | + $msg='Malformed UTF-8 characters, possibly incorrectly encoded'; |
|
| 278 | 278 | break; |
| 279 | 279 | default: |
| 280 | - $msg = 'Unknown error'; |
|
| 280 | + $msg='Unknown error'; |
|
| 281 | 281 | break; |
| 282 | 282 | } |
| 283 | 283 | throw new \Exception("JSON error ($err): $msg"); |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | //package base folder in prado alias notation |
| 4 | -$folders = [ |
|
| 4 | +$folders=[ |
|
| 5 | 5 | 'prado' => 'Prado\\Web\\Javascripts\\source\\prado', |
| 6 | 6 | 'jquery' => 'Vendor\\bower-asset\\jquery\\dist', |
| 7 | 7 | 'jquery-ui' => 'Vendor\\bower-asset\\jquery-ui', |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | ]; |
| 14 | 14 | |
| 15 | 15 | //package names and its contents (files relative to the current directory) |
| 16 | -$packages = [ |
|
| 16 | +$packages=[ |
|
| 17 | 17 | // base prado scripts |
| 18 | 18 | 'prado' => [ |
| 19 | 19 | 'prado/prado.js', |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | ]; |
| 113 | 113 | |
| 114 | 114 | //package names and their dependencies |
| 115 | -$dependencies = [ |
|
| 115 | +$dependencies=[ |
|
| 116 | 116 | 'jquery' => ['jquery'], |
| 117 | 117 | 'prado' => ['jquery', 'prado'], |
| 118 | 118 | 'bootstrap' => ['jquery', 'bootstrap'], |
@@ -1,14 +1,14 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | //package base folder in prado alias notation |
| 4 | -$folders = [ |
|
| 4 | +$folders=[ |
|
| 5 | 5 | 'jquery-ui' => 'Vendor\\bower-asset\\jquery-ui', |
| 6 | 6 | 'bootstrap' => 'Vendor\\bower-asset\\bootstrap\\dist', |
| 7 | 7 | 'highlightjs' => 'Vendor\\bower-asset\\highlightjs', |
| 8 | 8 | ]; |
| 9 | 9 | |
| 10 | 10 | //package names and its contents (files relative to the current directory) |
| 11 | -$packages = [ |
|
| 11 | +$packages=[ |
|
| 12 | 12 | 'jquery-ui' => [ |
| 13 | 13 | 'jquery-ui/themes/base/jquery-ui.css', |
| 14 | 14 | ], |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | ]; |
| 74 | 74 | |
| 75 | 75 | //package names and their dependencies |
| 76 | -$dependencies = [ |
|
| 76 | +$dependencies=[ |
|
| 77 | 77 | 'jquery-ui' => ['jquery-ui'], |
| 78 | 78 | 'jquery.ui.accordion' => ['jquery.ui.core', 'jquery.ui.accordion'], |
| 79 | 79 | 'jquery.ui.autocomplete' => ['jquery.ui.core', 'jquery.ui.autocomplete'], |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | /** |
| 56 | 56 | * Default web accessible base path for storing private files |
| 57 | 57 | */ |
| 58 | - const DEFAULT_BASEPATH = 'assets'; |
|
| 58 | + const DEFAULT_BASEPATH='assets'; |
|
| 59 | 59 | /** |
| 60 | 60 | * @var string base web accessible path for storing private files |
| 61 | 61 | */ |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | /** |
| 68 | 68 | * @var boolean whether to use timestamp checking to ensure files are published with up-to-date versions. |
| 69 | 69 | */ |
| 70 | - private $_checkTimestamp = false; |
|
| 70 | + private $_checkTimestamp=false; |
|
| 71 | 71 | /** |
| 72 | 72 | * @var TApplication application instance |
| 73 | 73 | */ |
@@ -75,11 +75,11 @@ discard block |
||
| 75 | 75 | /** |
| 76 | 76 | * @var array published assets |
| 77 | 77 | */ |
| 78 | - private $_published = []; |
|
| 78 | + private $_published=[]; |
|
| 79 | 79 | /** |
| 80 | 80 | * @var boolean whether the module is initialized |
| 81 | 81 | */ |
| 82 | - private $_initialized = false; |
|
| 82 | + private $_initialized=false; |
|
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | 85 | * Initializes the module. |
@@ -88,15 +88,15 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function init($config) |
| 90 | 90 | { |
| 91 | - $application = $this->getApplication(); |
|
| 92 | - if($this->_basePath === null) |
|
| 93 | - $this->_basePath = dirname($application->getRequest()->getApplicationFilePath()) . DIRECTORY_SEPARATOR . self::DEFAULT_BASEPATH; |
|
| 91 | + $application=$this->getApplication(); |
|
| 92 | + if($this->_basePath===null) |
|
| 93 | + $this->_basePath=dirname($application->getRequest()->getApplicationFilePath()).DIRECTORY_SEPARATOR.self::DEFAULT_BASEPATH; |
|
| 94 | 94 | if(!is_writable($this->_basePath) || !is_dir($this->_basePath)) |
| 95 | 95 | throw new TConfigurationException('assetmanager_basepath_invalid', $this->_basePath); |
| 96 | - if($this->_baseUrl === null) |
|
| 97 | - $this->_baseUrl = rtrim(dirname($application->getRequest()->getApplicationUrl()), '/\\') . '/' . self::DEFAULT_BASEPATH; |
|
| 96 | + if($this->_baseUrl===null) |
|
| 97 | + $this->_baseUrl=rtrim(dirname($application->getRequest()->getApplicationUrl()), '/\\').'/'.self::DEFAULT_BASEPATH; |
|
| 98 | 98 | $application->setAssetManager($this); |
| 99 | - $this->_initialized = true; |
|
| 99 | + $this->_initialized=true; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -119,8 +119,8 @@ discard block |
||
| 119 | 119 | throw new TInvalidOperationException('assetmanager_basepath_unchangeable'); |
| 120 | 120 | else |
| 121 | 121 | { |
| 122 | - $this->_basePath = Prado::getPathOfNamespace($value); |
|
| 123 | - if($this->_basePath === null || !is_dir($this->_basePath) || !is_writable($this->_basePath)) |
|
| 122 | + $this->_basePath=Prado::getPathOfNamespace($value); |
|
| 123 | + if($this->_basePath===null || !is_dir($this->_basePath) || !is_writable($this->_basePath)) |
|
| 124 | 124 | throw new TInvalidDataValueException('assetmanager_basepath_invalid', $value); |
| 125 | 125 | } |
| 126 | 126 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | if($this->_initialized) |
| 143 | 143 | throw new TInvalidOperationException('assetmanager_baseurl_unchangeable'); |
| 144 | 144 | else |
| 145 | - $this->_baseUrl = rtrim($value, '/'); |
|
| 145 | + $this->_baseUrl=rtrim($value, '/'); |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /** |
@@ -159,30 +159,30 @@ discard block |
||
| 159 | 159 | * @throws TInvalidDataValueException if the file path to be published is |
| 160 | 160 | * invalid |
| 161 | 161 | */ |
| 162 | - public function publishFilePath($path, $checkTimestamp = false) |
|
| 162 | + public function publishFilePath($path, $checkTimestamp=false) |
|
| 163 | 163 | { |
| 164 | 164 | if(isset($this->_published[$path])) |
| 165 | 165 | return $this->_published[$path]; |
| 166 | - elseif(empty($path) || ($fullpath = realpath($path)) === false) |
|
| 166 | + elseif(empty($path) || ($fullpath=realpath($path))===false) |
|
| 167 | 167 | throw new TInvalidDataValueException('assetmanager_filepath_invalid', $path); |
| 168 | 168 | elseif(is_file($fullpath)) |
| 169 | 169 | { |
| 170 | - $dir = $this->hash(dirname($fullpath)); |
|
| 171 | - $fileName = basename($fullpath); |
|
| 172 | - $dst = $this->_basePath . DIRECTORY_SEPARATOR . $dir; |
|
| 173 | - if(!is_file($dst . DIRECTORY_SEPARATOR . $fileName) || $checkTimestamp || $this->getApplication()->getMode() !== TApplicationMode::Performance) |
|
| 170 | + $dir=$this->hash(dirname($fullpath)); |
|
| 171 | + $fileName=basename($fullpath); |
|
| 172 | + $dst=$this->_basePath.DIRECTORY_SEPARATOR.$dir; |
|
| 173 | + if(!is_file($dst.DIRECTORY_SEPARATOR.$fileName) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance) |
|
| 174 | 174 | $this->copyFile($fullpath, $dst); |
| 175 | - return $this->_published[$path] = $this->_baseUrl . '/' . $dir . '/' . $fileName; |
|
| 175 | + return $this->_published[$path]=$this->_baseUrl.'/'.$dir.'/'.$fileName; |
|
| 176 | 176 | } |
| 177 | 177 | else |
| 178 | 178 | { |
| 179 | - $dir = $this->hash($fullpath); |
|
| 180 | - if(!is_dir($this->_basePath . DIRECTORY_SEPARATOR . $dir) || $checkTimestamp || $this->getApplication()->getMode() !== TApplicationMode::Performance) |
|
| 179 | + $dir=$this->hash($fullpath); |
|
| 180 | + if(!is_dir($this->_basePath.DIRECTORY_SEPARATOR.$dir) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance) |
|
| 181 | 181 | { |
| 182 | 182 | Prado::trace("Publishing directory $fullpath", 'Prado\Web\TAssetManager'); |
| 183 | - $this->copyDirectory($fullpath, $this->_basePath . DIRECTORY_SEPARATOR . $dir); |
|
| 183 | + $this->copyDirectory($fullpath, $this->_basePath.DIRECTORY_SEPARATOR.$dir); |
|
| 184 | 184 | } |
| 185 | - return $this->_published[$path] = $this->_baseUrl . '/' . $dir; |
|
| 185 | + return $this->_published[$path]=$this->_baseUrl.'/'.$dir; |
|
| 186 | 186 | } |
| 187 | 187 | } |
| 188 | 188 | |
@@ -199,9 +199,9 @@ discard block |
||
| 199 | 199 | * @param $values List of published assets |
| 200 | 200 | * @since 3.1.6 |
| 201 | 201 | */ |
| 202 | - protected function setPublished($values = []) |
|
| 202 | + protected function setPublished($values=[]) |
|
| 203 | 203 | { |
| 204 | - $this->_published = $values; |
|
| 204 | + $this->_published=$values; |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
@@ -213,11 +213,11 @@ discard block |
||
| 213 | 213 | */ |
| 214 | 214 | public function getPublishedPath($path) |
| 215 | 215 | { |
| 216 | - $path = realpath($path); |
|
| 216 | + $path=realpath($path); |
|
| 217 | 217 | if(is_file($path)) |
| 218 | - return $this->_basePath . DIRECTORY_SEPARATOR . $this->hash(dirname($path)) . DIRECTORY_SEPARATOR . basename($path); |
|
| 218 | + return $this->_basePath.DIRECTORY_SEPARATOR.$this->hash(dirname($path)).DIRECTORY_SEPARATOR.basename($path); |
|
| 219 | 219 | else |
| 220 | - return $this->_basePath . DIRECTORY_SEPARATOR . $this->hash($path); |
|
| 220 | + return $this->_basePath.DIRECTORY_SEPARATOR.$this->hash($path); |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | /** |
@@ -229,11 +229,11 @@ discard block |
||
| 229 | 229 | */ |
| 230 | 230 | public function getPublishedUrl($path) |
| 231 | 231 | { |
| 232 | - $path = realpath($path); |
|
| 232 | + $path=realpath($path); |
|
| 233 | 233 | if(is_file($path)) |
| 234 | - return $this->_baseUrl . '/' . $this->hash(dirname($path)) . '/' . basename($path); |
|
| 234 | + return $this->_baseUrl.'/'.$this->hash(dirname($path)).'/'.basename($path); |
|
| 235 | 235 | else |
| 236 | - return $this->_baseUrl . '/' . $this->hash($path); |
|
| 236 | + return $this->_baseUrl.'/'.$this->hash($path); |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | /** |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | protected function hash($dir) |
| 246 | 246 | { |
| 247 | - return sprintf('%x', crc32($dir . Prado::getVersion())); |
|
| 247 | + return sprintf('%x', crc32($dir.Prado::getVersion())); |
|
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | /** |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | @mkdir($dst); |
| 262 | 262 | @chmod($dst, PRADO_CHMOD); |
| 263 | 263 | } |
| 264 | - $dstFile = $dst . DIRECTORY_SEPARATOR . basename($src); |
|
| 264 | + $dstFile=$dst.DIRECTORY_SEPARATOR.basename($src); |
|
| 265 | 265 | if(@filemtime($dstFile) < @filemtime($src)) |
| 266 | 266 | { |
| 267 | 267 | Prado::trace("Publishing file $src to $dstFile", 'Prado\Web\TAssetManager'); |
@@ -284,22 +284,22 @@ discard block |
||
| 284 | 284 | @mkdir($dst); |
| 285 | 285 | @chmod($dst, PRADO_CHMOD); |
| 286 | 286 | } |
| 287 | - if($folder = @opendir($src)) |
|
| 287 | + if($folder=@opendir($src)) |
|
| 288 | 288 | { |
| 289 | - while($file = @readdir($folder)) |
|
| 289 | + while($file=@readdir($folder)) |
|
| 290 | 290 | { |
| 291 | - if($file === '.' || $file === '..' || $file === '.svn' || $file === '.git') |
|
| 291 | + if($file==='.' || $file==='..' || $file==='.svn' || $file==='.git') |
|
| 292 | 292 | continue; |
| 293 | - elseif(is_file($src . DIRECTORY_SEPARATOR . $file)) |
|
| 293 | + elseif(is_file($src.DIRECTORY_SEPARATOR.$file)) |
|
| 294 | 294 | { |
| 295 | - if(@filemtime($dst . DIRECTORY_SEPARATOR . $file) < @filemtime($src . DIRECTORY_SEPARATOR . $file)) |
|
| 295 | + if(@filemtime($dst.DIRECTORY_SEPARATOR.$file) < @filemtime($src.DIRECTORY_SEPARATOR.$file)) |
|
| 296 | 296 | { |
| 297 | - @copy($src . DIRECTORY_SEPARATOR . $file, $dst . DIRECTORY_SEPARATOR . $file); |
|
| 298 | - @chmod($dst . DIRECTORY_SEPARATOR . $file, PRADO_CHMOD); |
|
| 297 | + @copy($src.DIRECTORY_SEPARATOR.$file, $dst.DIRECTORY_SEPARATOR.$file); |
|
| 298 | + @chmod($dst.DIRECTORY_SEPARATOR.$file, PRADO_CHMOD); |
|
| 299 | 299 | } |
| 300 | 300 | } |
| 301 | 301 | else |
| 302 | - $this->copyDirectory($src . DIRECTORY_SEPARATOR . $file, $dst . DIRECTORY_SEPARATOR . $file); |
|
| 302 | + $this->copyDirectory($src.DIRECTORY_SEPARATOR.$file, $dst.DIRECTORY_SEPARATOR.$file); |
|
| 303 | 303 | } |
| 304 | 304 | closedir($folder); |
| 305 | 305 | } else { |
@@ -318,26 +318,26 @@ discard block |
||
| 318 | 318 | * @param boolean Wether or not to check the time stamp of the file for publishing. Defaults to false. |
| 319 | 319 | * @return string URL path to the directory where the tar file was extracted. |
| 320 | 320 | */ |
| 321 | - public function publishTarFile($tarfile, $md5sum, $checkTimestamp = false) |
|
| 321 | + public function publishTarFile($tarfile, $md5sum, $checkTimestamp=false) |
|
| 322 | 322 | { |
| 323 | 323 | if(isset($this->_published[$md5sum])) |
| 324 | 324 | return $this->_published[$md5sum]; |
| 325 | - elseif(($fullpath = realpath($md5sum)) === false || !is_file($fullpath)) |
|
| 325 | + elseif(($fullpath=realpath($md5sum))===false || !is_file($fullpath)) |
|
| 326 | 326 | throw new TInvalidDataValueException('assetmanager_tarchecksum_invalid', $md5sum); |
| 327 | 327 | else |
| 328 | 328 | { |
| 329 | - $dir = $this->hash(dirname($fullpath)); |
|
| 330 | - $fileName = basename($fullpath); |
|
| 331 | - $dst = $this->_basePath . DIRECTORY_SEPARATOR . $dir; |
|
| 332 | - if(!is_file($dst . DIRECTORY_SEPARATOR . $fileName) || $checkTimestamp || $this->getApplication()->getMode() !== TApplicationMode::Performance) |
|
| 329 | + $dir=$this->hash(dirname($fullpath)); |
|
| 330 | + $fileName=basename($fullpath); |
|
| 331 | + $dst=$this->_basePath.DIRECTORY_SEPARATOR.$dir; |
|
| 332 | + if(!is_file($dst.DIRECTORY_SEPARATOR.$fileName) || $checkTimestamp || $this->getApplication()->getMode()!==TApplicationMode::Performance) |
|
| 333 | 333 | { |
| 334 | - if(@filemtime($dst . DIRECTORY_SEPARATOR . $fileName) < @filemtime($fullpath)) |
|
| 334 | + if(@filemtime($dst.DIRECTORY_SEPARATOR.$fileName) < @filemtime($fullpath)) |
|
| 335 | 335 | { |
| 336 | 336 | $this->copyFile($fullpath, $dst); |
| 337 | 337 | $this->deployTarFile($tarfile, $dst); |
| 338 | 338 | } |
| 339 | 339 | } |
| 340 | - return $this->_published[$md5sum] = $this->_baseUrl . '/' . $dir; |
|
| 340 | + return $this->_published[$md5sum]=$this->_baseUrl.'/'.$dir; |
|
| 341 | 341 | } |
| 342 | 342 | } |
| 343 | 343 | |
@@ -350,11 +350,11 @@ discard block |
||
| 350 | 350 | */ |
| 351 | 351 | protected function deployTarFile($path, $destination) |
| 352 | 352 | { |
| 353 | - if(($fullpath = realpath($path)) === false || !is_file($fullpath)) |
|
| 353 | + if(($fullpath=realpath($path))===false || !is_file($fullpath)) |
|
| 354 | 354 | throw new TIOException('assetmanager_tarfile_invalid', $path); |
| 355 | 355 | else |
| 356 | 356 | { |
| 357 | - $tar = new TTarFileExtractor($fullpath); |
|
| 357 | + $tar=new TTarFileExtractor($fullpath); |
|
| 358 | 358 | return $tar->extract($destination); |
| 359 | 359 | } |
| 360 | 360 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | class THttpRequestUrlFormat extends \Prado\TEnumerable |
| 29 | 29 | { |
| 30 | - const Get = 'Get'; |
|
| 31 | - const Path = 'Path'; |
|
| 32 | - const HiddenPath = 'HiddenPath'; |
|
| 30 | + const Get='Get'; |
|
| 31 | + const Path='Path'; |
|
| 32 | + const HiddenPath='HiddenPath'; |
|
| 33 | 33 | } |
| 34 | 34 | \ No newline at end of file |
@@ -20,9 +20,9 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | class THttpUtility |
| 22 | 22 | { |
| 23 | - private static $_encodeTable = ['<' => '<','>' => '>','"' => '"']; |
|
| 24 | - private static $_decodeTable = ['<' => '<','>' => '>','"' => '"']; |
|
| 25 | - private static $_stripTable = ['<' => '','>' => '','"' => '']; |
|
| 23 | + private static $_encodeTable=['<' => '<', '>' => '>', '"' => '"']; |
|
| 24 | + private static $_decodeTable=['<' => '<', '>' => '>', '"' => '"']; |
|
| 25 | + private static $_stripTable=['<' => '', '>' => '', '"' => '']; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * HTML-encodes a string. |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function __construct($response) |
| 36 | 36 | { |
| 37 | - $this->_response = $response; |
|
| 37 | + $this->_response=$response; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | /** |
| 47 | 47 | * prefix for cache variable name used to store parsed themes |
| 48 | 48 | */ |
| 49 | - const THEME_CACHE_PREFIX = 'prado:theme:'; |
|
| 49 | + const THEME_CACHE_PREFIX='prado:theme:'; |
|
| 50 | 50 | /** |
| 51 | 51 | * Extension name of skin files |
| 52 | 52 | */ |
| 53 | - const SKIN_FILE_EXT = '.skin'; |
|
| 53 | + const SKIN_FILE_EXT='.skin'; |
|
| 54 | 54 | /** |
| 55 | 55 | * @var string theme path |
| 56 | 56 | */ |
@@ -66,15 +66,15 @@ discard block |
||
| 66 | 66 | /** |
| 67 | 67 | * @var string theme name |
| 68 | 68 | */ |
| 69 | - private $_name = ''; |
|
| 69 | + private $_name=''; |
|
| 70 | 70 | /** |
| 71 | 71 | * @var array list of css files |
| 72 | 72 | */ |
| 73 | - private $_cssFiles = []; |
|
| 73 | + private $_cssFiles=[]; |
|
| 74 | 74 | /** |
| 75 | 75 | * @var array list of js files |
| 76 | 76 | */ |
| 77 | - private $_jsFiles = []; |
|
| 77 | + private $_jsFiles=[]; |
|
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * Constructor. |
@@ -84,75 +84,75 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function __construct($themePath, $themeUrl) |
| 86 | 86 | { |
| 87 | - $this->_themeUrl = $themeUrl; |
|
| 88 | - $this->_themePath = realpath($themePath); |
|
| 89 | - $this->_name = basename($themePath); |
|
| 90 | - $cacheValid = false; |
|
| 87 | + $this->_themeUrl=$themeUrl; |
|
| 88 | + $this->_themePath=realpath($themePath); |
|
| 89 | + $this->_name=basename($themePath); |
|
| 90 | + $cacheValid=false; |
|
| 91 | 91 | // TODO: the following needs to be cleaned up (Qiang) |
| 92 | - if(($cache = $this->getApplication()->getCache()) !== null) |
|
| 92 | + if(($cache=$this->getApplication()->getCache())!==null) |
|
| 93 | 93 | { |
| 94 | - $array = $cache->get(self::THEME_CACHE_PREFIX . $themePath); |
|
| 94 | + $array=$cache->get(self::THEME_CACHE_PREFIX.$themePath); |
|
| 95 | 95 | if(is_array($array)) |
| 96 | 96 | { |
| 97 | - list($skins, $cssFiles, $jsFiles, $timestamp) = $array; |
|
| 98 | - if($this->getApplication()->getMode() !== TApplicationMode::Performance) |
|
| 97 | + list($skins, $cssFiles, $jsFiles, $timestamp)=$array; |
|
| 98 | + if($this->getApplication()->getMode()!==TApplicationMode::Performance) |
|
| 99 | 99 | { |
| 100 | - if(($dir = opendir($themePath)) === false) |
|
| 100 | + if(($dir=opendir($themePath))===false) |
|
| 101 | 101 | throw new TIOException('theme_path_inexistent', $themePath); |
| 102 | - $cacheValid = true; |
|
| 103 | - while(($file = readdir($dir)) !== false) |
|
| 102 | + $cacheValid=true; |
|
| 103 | + while(($file=readdir($dir))!==false) |
|
| 104 | 104 | { |
| 105 | - if($file === '.' || $file === '..') |
|
| 105 | + if($file==='.' || $file==='..') |
|
| 106 | 106 | continue; |
| 107 | - elseif(basename($file, '.css') !== $file) |
|
| 108 | - $this->_cssFiles[] = $themeUrl . '/' . $file; |
|
| 109 | - elseif(basename($file, '.js') !== $file) |
|
| 110 | - $this->_jsFiles[] = $themeUrl . '/' . $file; |
|
| 111 | - elseif(basename($file, self::SKIN_FILE_EXT) !== $file && filemtime($themePath . DIRECTORY_SEPARATOR . $file) > $timestamp) |
|
| 107 | + elseif(basename($file, '.css')!==$file) |
|
| 108 | + $this->_cssFiles[]=$themeUrl.'/'.$file; |
|
| 109 | + elseif(basename($file, '.js')!==$file) |
|
| 110 | + $this->_jsFiles[]=$themeUrl.'/'.$file; |
|
| 111 | + elseif(basename($file, self::SKIN_FILE_EXT)!==$file && filemtime($themePath.DIRECTORY_SEPARATOR.$file) > $timestamp) |
|
| 112 | 112 | { |
| 113 | - $cacheValid = false; |
|
| 113 | + $cacheValid=false; |
|
| 114 | 114 | break; |
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | closedir($dir); |
| 118 | 118 | if($cacheValid) |
| 119 | - $this->_skins = $skins; |
|
| 119 | + $this->_skins=$skins; |
|
| 120 | 120 | } |
| 121 | 121 | else |
| 122 | 122 | { |
| 123 | - $cacheValid = true; |
|
| 124 | - $this->_cssFiles = $cssFiles; |
|
| 125 | - $this->_jsFiles = $jsFiles; |
|
| 126 | - $this->_skins = $skins; |
|
| 123 | + $cacheValid=true; |
|
| 124 | + $this->_cssFiles=$cssFiles; |
|
| 125 | + $this->_jsFiles=$jsFiles; |
|
| 126 | + $this->_skins=$skins; |
|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | if(!$cacheValid) |
| 131 | 131 | { |
| 132 | - $this->_cssFiles = []; |
|
| 133 | - $this->_jsFiles = []; |
|
| 134 | - $this->_skins = []; |
|
| 135 | - if(($dir = opendir($themePath)) === false) |
|
| 132 | + $this->_cssFiles=[]; |
|
| 133 | + $this->_jsFiles=[]; |
|
| 134 | + $this->_skins=[]; |
|
| 135 | + if(($dir=opendir($themePath))===false) |
|
| 136 | 136 | throw new TIOException('theme_path_inexistent', $themePath); |
| 137 | - while(($file = readdir($dir)) !== false) |
|
| 137 | + while(($file=readdir($dir))!==false) |
|
| 138 | 138 | { |
| 139 | - if($file === '.' || $file === '..') |
|
| 139 | + if($file==='.' || $file==='..') |
|
| 140 | 140 | continue; |
| 141 | - elseif(basename($file, '.css') !== $file) |
|
| 142 | - $this->_cssFiles[] = $themeUrl . '/' . $file; |
|
| 143 | - elseif(basename($file, '.js') !== $file) |
|
| 144 | - $this->_jsFiles[] = $themeUrl . '/' . $file; |
|
| 145 | - elseif(basename($file, self::SKIN_FILE_EXT) !== $file) |
|
| 141 | + elseif(basename($file, '.css')!==$file) |
|
| 142 | + $this->_cssFiles[]=$themeUrl.'/'.$file; |
|
| 143 | + elseif(basename($file, '.js')!==$file) |
|
| 144 | + $this->_jsFiles[]=$themeUrl.'/'.$file; |
|
| 145 | + elseif(basename($file, self::SKIN_FILE_EXT)!==$file) |
|
| 146 | 146 | { |
| 147 | - $template = new TTemplate(file_get_contents($themePath . '/' . $file), $themePath, $themePath . '/' . $file); |
|
| 147 | + $template=new TTemplate(file_get_contents($themePath.'/'.$file), $themePath, $themePath.'/'.$file); |
|
| 148 | 148 | foreach($template->getItems() as $skin) |
| 149 | 149 | { |
| 150 | 150 | if(!isset($skin[2])) // a text string, ignored |
| 151 | 151 | continue; |
| 152 | - elseif($skin[0] !== -1) |
|
| 152 | + elseif($skin[0]!==-1) |
|
| 153 | 153 | throw new TConfigurationException('theme_control_nested', $skin[1], dirname($themePath)); |
| 154 | - $type = $skin[1]; |
|
| 155 | - $id = isset($skin[2]['skinid'])?$skin[2]['skinid']:0; |
|
| 154 | + $type=$skin[1]; |
|
| 155 | + $id=isset($skin[2]['skinid']) ? $skin[2]['skinid'] : 0; |
|
| 156 | 156 | unset($skin[2]['skinid']); |
| 157 | 157 | if(isset($this->_skins[$type][$id])) |
| 158 | 158 | throw new TConfigurationException('theme_skinid_duplicated', $type, $id, dirname($themePath)); |
@@ -163,15 +163,15 @@ discard block |
||
| 163 | 163 | throw new TConfigurationException('theme_databind_forbidden',dirname($themePath),$type,$id); |
| 164 | 164 | } |
| 165 | 165 | */ |
| 166 | - $this->_skins[$type][$id] = $skin[2]; |
|
| 166 | + $this->_skins[$type][$id]=$skin[2]; |
|
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | 169 | } |
| 170 | 170 | closedir($dir); |
| 171 | 171 | sort($this->_cssFiles); |
| 172 | 172 | sort($this->_jsFiles); |
| 173 | - if($cache !== null) |
|
| 174 | - $cache->set(self::THEME_CACHE_PREFIX . $themePath, [$this->_skins,$this->_cssFiles,$this->_jsFiles,time()]); |
|
| 173 | + if($cache!==null) |
|
| 174 | + $cache->set(self::THEME_CACHE_PREFIX.$themePath, [$this->_skins, $this->_cssFiles, $this->_jsFiles, time()]); |
|
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | */ |
| 189 | 189 | protected function setName($value) |
| 190 | 190 | { |
| 191 | - $this->_name = $value; |
|
| 191 | + $this->_name=$value; |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | */ |
| 205 | 205 | protected function setBaseUrl($value) |
| 206 | 206 | { |
| 207 | - $this->_themeUrl = rtrim($value, '/'); |
|
| 207 | + $this->_themeUrl=rtrim($value, '/'); |
|
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | /** |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | */ |
| 221 | 221 | protected function setBasePath($value) |
| 222 | 222 | { |
| 223 | - $this->_themePath = $value; |
|
| 223 | + $this->_themePath=$value; |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | /** |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | protected function setSkins($value) |
| 238 | 238 | { |
| 239 | - $this->_skins = $value; |
|
| 239 | + $this->_skins=$value; |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | /** |
@@ -250,9 +250,9 @@ discard block |
||
| 250 | 250 | */ |
| 251 | 251 | public function applySkin($control) |
| 252 | 252 | { |
| 253 | - $type = get_class($control); |
|
| 254 | - if(($id = $control->getSkinID()) === '') |
|
| 255 | - $id = 0; |
|
| 253 | + $type=get_class($control); |
|
| 254 | + if(($id=$control->getSkinID())==='') |
|
| 255 | + $id=0; |
|
| 256 | 256 | if(isset($this->_skins[$type][$id])) |
| 257 | 257 | { |
| 258 | 258 | foreach($this->_skins[$type][$id] as $name => $value) |
@@ -263,10 +263,10 @@ discard block |
||
| 263 | 263 | switch($value[0]) |
| 264 | 264 | { |
| 265 | 265 | case TTemplate::CONFIG_EXPRESSION: |
| 266 | - $value = $this->evaluateExpression($value[1]); |
|
| 266 | + $value=$this->evaluateExpression($value[1]); |
|
| 267 | 267 | break; |
| 268 | 268 | case TTemplate::CONFIG_ASSET: |
| 269 | - $value = $this->_themeUrl . '/' . ltrim($value[1], '/'); |
|
| 269 | + $value=$this->_themeUrl.'/'.ltrim($value[1], '/'); |
|
| 270 | 270 | break; |
| 271 | 271 | case TTemplate::CONFIG_DATABIND: |
| 272 | 272 | $control->bindProperty($name, $value[1]); |
@@ -287,13 +287,13 @@ discard block |
||
| 287 | 287 | } |
| 288 | 288 | if(!is_array($value)) |
| 289 | 289 | { |
| 290 | - if(strpos($name, '.') === false) // is simple property or custom attribute |
|
| 290 | + if(strpos($name, '.')===false) // is simple property or custom attribute |
|
| 291 | 291 | { |
| 292 | 292 | if($control->hasProperty($name)) |
| 293 | 293 | { |
| 294 | 294 | if($control->canSetProperty($name)) |
| 295 | 295 | { |
| 296 | - $setter = 'set' . $name; |
|
| 296 | + $setter='set'.$name; |
|
| 297 | 297 | $control->$setter($value); |
| 298 | 298 | } |
| 299 | 299 | else |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | */ |
| 326 | 326 | protected function setStyleSheetFiles($value) |
| 327 | 327 | { |
| 328 | - $this->_cssFiles = $value; |
|
| 328 | + $this->_cssFiles=$value; |
|
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | /** |
@@ -341,6 +341,6 @@ discard block |
||
| 341 | 341 | */ |
| 342 | 342 | protected function setJavaScriptFiles($value) |
| 343 | 343 | { |
| 344 | - $this->_jsFiles = $value; |
|
| 344 | + $this->_jsFiles=$value; |
|
| 345 | 345 | } |
| 346 | 346 | } |
| 347 | 347 | \ No newline at end of file |