@@ -103,6 +103,9 @@ discard block |
||
103 | 103 | return session_start(); |
104 | 104 | } |
105 | 105 | |
106 | + /** |
|
107 | + * @param string $variable |
|
108 | + */ |
|
106 | 109 | function tep_session_register($variable) { |
107 | 110 | global $session_started; |
108 | 111 | |
@@ -121,6 +124,9 @@ discard block |
||
121 | 124 | return false; |
122 | 125 | } |
123 | 126 | |
127 | + /** |
|
128 | + * @param string $variable |
|
129 | + */ |
|
124 | 130 | function tep_session_is_registered($variable) { |
125 | 131 | if (PHP_VERSION < 4.3) { |
126 | 132 | return session_is_registered($variable); |
@@ -129,6 +135,9 @@ discard block |
||
129 | 135 | } |
130 | 136 | } |
131 | 137 | |
138 | + /** |
|
139 | + * @param string $variable |
|
140 | + */ |
|
132 | 141 | function tep_session_unregister($variable) { |
133 | 142 | if (PHP_VERSION < 4.3) { |
134 | 143 | return session_unregister($variable); |
@@ -44,6 +44,10 @@ |
||
44 | 44 | } |
45 | 45 | } |
46 | 46 | |
47 | + /** |
|
48 | + * @param string $old_id |
|
49 | + * @param string $new_id |
|
50 | + */ |
|
47 | 51 | function tep_whos_online_update_session_id($old_id, $new_id) { |
48 | 52 | tep_db_query("update " . TABLE_WHOS_ONLINE . " set session_id = '" . tep_db_input($new_id) . "' where session_id = '" . tep_db_input($old_id) . "'"); |
49 | 53 | } |
@@ -387,6 +387,9 @@ discard block |
||
387 | 387 | return $this->_check; |
388 | 388 | } |
389 | 389 | |
390 | + /** |
|
391 | + * @param string $parameter |
|
392 | + */ |
|
390 | 393 | function install($parameter = null) { |
391 | 394 | $params = $this->getParams(); |
392 | 395 | |
@@ -517,6 +520,9 @@ discard block |
||
517 | 520 | return $params; |
518 | 521 | } |
519 | 522 | |
523 | + /** |
|
524 | + * @param string $data |
|
525 | + */ |
|
520 | 526 | function _hmac($key, $data) { |
521 | 527 | if (function_exists('hash_hmac')) { |
522 | 528 | return hash_hmac('md5', $data, $key); |
@@ -547,6 +547,9 @@ |
||
547 | 547 | return $this->_check; |
548 | 548 | } |
549 | 549 | |
550 | + /** |
|
551 | + * @param string $parameter |
|
552 | + */ |
|
550 | 553 | function install($parameter = null) { |
551 | 554 | $params = $this->getParams(); |
552 | 555 |
@@ -679,6 +679,9 @@ discard block |
||
679 | 679 | return $this->_check; |
680 | 680 | } |
681 | 681 | |
682 | + /** |
|
683 | + * @param string $parameter |
|
684 | + */ |
|
682 | 685 | function install($parameter = null) { |
683 | 686 | $params = $this->getParams(); |
684 | 687 | |
@@ -874,6 +877,10 @@ discard block |
||
874 | 877 | return $params; |
875 | 878 | } |
876 | 879 | |
880 | + /** |
|
881 | + * @param string $url |
|
882 | + * @param string $parameters |
|
883 | + */ |
|
877 | 884 | function sendTransactionToGateway($url, $parameters) { |
878 | 885 | $server = parse_url($url); |
879 | 886 | |
@@ -992,6 +999,9 @@ discard block |
||
992 | 999 | return !empty($this->_cards); |
993 | 1000 | } |
994 | 1001 | |
1002 | + /** |
|
1003 | + * @param string $key |
|
1004 | + */ |
|
995 | 1005 | function isCard($key) { |
996 | 1006 | if (!isset($this->_cards)) { |
997 | 1007 | $this->getCardTypes(); |
@@ -344,6 +344,9 @@ discard block |
||
344 | 344 | return $this->_check; |
345 | 345 | } |
346 | 346 | |
347 | + /** |
|
348 | + * @param string $parameter |
|
349 | + */ |
|
347 | 350 | function install($parameter = null) { |
348 | 351 | $params = $this->getParams(); |
349 | 352 | |
@@ -513,6 +516,9 @@ discard block |
||
513 | 516 | return $order_total_array; |
514 | 517 | } |
515 | 518 | |
519 | + /** |
|
520 | + * @param string $string |
|
521 | + */ |
|
516 | 522 | function encryptParams($string) { |
517 | 523 | // pad pkcs5 |
518 | 524 | $blocksize = 16; |
@@ -167,6 +167,9 @@ discard block |
||
167 | 167 | |
168 | 168 | } |
169 | 169 | |
170 | + /** |
|
171 | + * @param string $raw_datetime |
|
172 | + */ |
|
170 | 173 | function tep_datetime_short($raw_datetime) { |
171 | 174 | if ( ($raw_datetime == '0000-00-00 00:00:00') || ($raw_datetime == '') ) return false; |
172 | 175 | |
@@ -277,6 +280,10 @@ discard block |
||
277 | 280 | return $image; |
278 | 281 | } |
279 | 282 | |
283 | + /** |
|
284 | + * @param string $string |
|
285 | + * @param integer $len |
|
286 | + */ |
|
280 | 287 | function tep_break_string($string, $len, $break_char = '-') { |
281 | 288 | $l = 0; |
282 | 289 | $output = ''; |
@@ -334,6 +341,9 @@ discard block |
||
334 | 341 | } |
335 | 342 | } |
336 | 343 | |
344 | + /** |
|
345 | + * @param string $component |
|
346 | + */ |
|
337 | 347 | function tep_browser_detect($component) { |
338 | 348 | return stristr(getenv('HTTP_USER_AGENT'), $component); |
339 | 349 | } |
@@ -377,6 +387,11 @@ discard block |
||
377 | 387 | return $geo_zone_name; |
378 | 388 | } |
379 | 389 | |
390 | + /** |
|
391 | + * @param boolean $html |
|
392 | + * @param string $boln |
|
393 | + * @param string $eoln |
|
394 | + */ |
|
380 | 395 | function tep_address_format($address_format_id, $address, $html, $boln, $eoln) { |
381 | 396 | $address_format_query = tep_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . (int)$address_format_id . "'"); |
382 | 397 | $address_format = tep_db_fetch_array($address_format_query); |
@@ -474,6 +489,9 @@ discard block |
||
474 | 489 | return $state_prov_code; |
475 | 490 | } |
476 | 491 | |
492 | + /** |
|
493 | + * @param string $params |
|
494 | + */ |
|
477 | 495 | function tep_get_uprid($prid, $params) { |
478 | 496 | $uprid = $prid; |
479 | 497 | if ( (is_array($params)) && (!strstr($prid, '{')) ) { |
@@ -571,6 +589,9 @@ discard block |
||
571 | 589 | //// |
572 | 590 | // Wrapper for class_exists() function |
573 | 591 | // This function is not available in all PHP versions so we test it before using it. |
592 | + /** |
|
593 | + * @param string $class_name |
|
594 | + */ |
|
574 | 595 | function tep_class_exists($class_name) { |
575 | 596 | if (function_exists('class_exists')) { |
576 | 597 | return class_exists($class_name); |
@@ -730,6 +751,9 @@ discard block |
||
730 | 751 | |
731 | 752 | //// |
732 | 753 | // Sets the status of a banner |
754 | + /** |
|
755 | + * @param string $status |
|
756 | + */ |
|
733 | 757 | function tep_set_banner_status($banners_id, $status) { |
734 | 758 | if ($status == '1') { |
735 | 759 | return tep_db_query("update " . TABLE_BANNERS . " set status = '1', expires_impressions = NULL, expires_date = NULL, date_status_change = NULL where banners_id = '" . $banners_id . "'"); |
@@ -766,6 +790,9 @@ discard block |
||
766 | 790 | |
767 | 791 | //// |
768 | 792 | // Sets the status of a product on special |
793 | + /** |
|
794 | + * @param string $status |
|
795 | + */ |
|
769 | 796 | function tep_set_specials_status($specials_id, $status) { |
770 | 797 | if ($status == '1') { |
771 | 798 | return tep_db_query("update " . TABLE_SPECIALS . " set status = '1', expires_date = NULL, date_status_change = NULL where specials_id = '" . (int)$specials_id . "'"); |
@@ -1016,6 +1043,9 @@ discard block |
||
1016 | 1043 | tep_db_query("delete from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "'"); |
1017 | 1044 | } |
1018 | 1045 | |
1046 | + /** |
|
1047 | + * @param string $cache_block |
|
1048 | + */ |
|
1019 | 1049 | function tep_reset_cache_block($cache_block) { |
1020 | 1050 | global $cache_blocks; |
1021 | 1051 | |
@@ -1159,6 +1189,11 @@ discard block |
||
1159 | 1189 | return $value; |
1160 | 1190 | } |
1161 | 1191 | |
1192 | + /** |
|
1193 | + * @param string $to_name |
|
1194 | + * @param string $email_subject |
|
1195 | + * @param string $email_text |
|
1196 | + */ |
|
1162 | 1197 | function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) { |
1163 | 1198 | if (SEND_EMAILS != 'true') return false; |
1164 | 1199 | |
@@ -1211,6 +1246,9 @@ discard block |
||
1211 | 1246 | |
1212 | 1247 | //// |
1213 | 1248 | // Wrapper function for round() for php3 compatibility |
1249 | + /** |
|
1250 | + * @return double |
|
1251 | + */ |
|
1214 | 1252 | function tep_round($value, $precision) { |
1215 | 1253 | return round($value, $precision); |
1216 | 1254 | } |
@@ -1327,6 +1365,10 @@ discard block |
||
1327 | 1365 | |
1328 | 1366 | //// |
1329 | 1367 | // Return a random value |
1368 | + /** |
|
1369 | + * @param integer $min |
|
1370 | + * @param integer $max |
|
1371 | + */ |
|
1330 | 1372 | function tep_rand($min = null, $max = null) { |
1331 | 1373 | static $seeded; |
1332 | 1374 | |
@@ -1350,6 +1392,9 @@ discard block |
||
1350 | 1392 | } |
1351 | 1393 | |
1352 | 1394 | // nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n) |
1395 | + /** |
|
1396 | + * @param string[] $from |
|
1397 | + */ |
|
1353 | 1398 | function tep_convert_linefeeds($from, $to, $string) { |
1354 | 1399 | if ((PHP_VERSION < "4.0.5") && is_array($from)) { |
1355 | 1400 | return preg_replace('/(' . implode('|', $from) . ')/', $to, $string); |
@@ -63,7 +63,7 @@ |
||
63 | 63 | * initializes instance properties from the keys/values of an array |
64 | 64 | * @ignore |
65 | 65 | * @access protected |
66 | - * @param <type> $aAttribs array of properties to set - single level |
|
66 | + * @param <type> $attributes array of properties to set - single level |
|
67 | 67 | * @return void |
68 | 68 | */ |
69 | 69 | private function _initializeFromArray($attributes) |
@@ -3,6 +3,9 @@ |
||
3 | 3 | |
4 | 4 | class KeyValueNode |
5 | 5 | { |
6 | + /** |
|
7 | + * @param string $name |
|
8 | + */ |
|
6 | 9 | public function __construct($name) |
7 | 10 | { |
8 | 11 | $this->name = $name; |