@@ -121,6 +121,9 @@ discard block |
||
121 | 121 | } |
122 | 122 | } |
123 | 123 | |
124 | + /** |
|
125 | + * @param string $filter |
|
126 | + */ |
|
124 | 127 | public static function queryCacheSetByFilter($location_type, $filter, $record_id) { |
125 | 128 | SnCache::$queries[$location_type][$filter][$record_id] = &SnCache::getDataRefByLocationAndId($location_type, $record_id); |
126 | 129 | } |
@@ -160,14 +163,23 @@ discard block |
||
160 | 163 | return true; // Не всегда - от результата |
161 | 164 | } |
162 | 165 | |
166 | + /** |
|
167 | + * @param integer $locationType |
|
168 | + */ |
|
163 | 169 | public static function getData($locationType = LOC_NONE) { |
164 | 170 | return $locationType == LOC_NONE ? static::$data : static::$data[$locationType]; |
165 | 171 | } |
166 | 172 | |
173 | + /** |
|
174 | + * @param integer $locationType |
|
175 | + */ |
|
167 | 176 | public static function cacheUnsetElement($locationType, $recordId) { |
168 | 177 | static::$data[$locationType][$recordId] = null; |
169 | 178 | } |
170 | 179 | |
180 | + /** |
|
181 | + * @param integer $locationType |
|
182 | + */ |
|
171 | 183 | public static function isArrayLocation($locationType) { |
172 | 184 | return is_array(static::$data[$locationType]); |
173 | 185 | } |
@@ -190,6 +202,9 @@ discard block |
||
190 | 202 | } |
191 | 203 | } |
192 | 204 | |
205 | + /** |
|
206 | + * @param integer $unit_snid |
|
207 | + */ |
|
193 | 208 | public static function getUnitLocator($location_type, $location_id, $unit_snid) { |
194 | 209 | return $unit_snid ? static::$locator[LOC_UNIT][$location_type][$location_id][$unit_snid] : static::$locator[LOC_UNIT][$location_type][$location_id]; |
195 | 210 | } |
@@ -222,14 +237,23 @@ discard block |
||
222 | 237 | return static::$locks; |
223 | 238 | } |
224 | 239 | |
240 | + /** |
|
241 | + * @param string $filter |
|
242 | + */ |
|
225 | 243 | public static function getQueriesByLocationAndFilter($locationType, $filter) { |
226 | 244 | return !empty(static::$queries[$locationType][$filter]) && is_array(static::$queries[$locationType][$filter]) ? static::$queries[$locationType][$filter] : array(); |
227 | 245 | } |
228 | 246 | |
247 | + /** |
|
248 | + * @param string $filter |
|
249 | + */ |
|
229 | 250 | public static function isQueryCacheByLocationAndFilterEmpty($locationType, $filter) { |
230 | 251 | return !isset(SnCache::$queries[$locationType][$filter]) || SnCache::$queries[$locationType][$filter] === null; |
231 | 252 | } |
232 | 253 | |
254 | + /** |
|
255 | + * @param string $filter |
|
256 | + */ |
|
233 | 257 | public static function queryCacheResetByLocationAndFilter($locationType, $filter) { |
234 | 258 | SnCache::$queries[$locationType][$filter] = array(); |
235 | 259 | } |
@@ -81,6 +81,10 @@ discard block |
||
81 | 81 | // ------------------------------------------------------------------------- |
82 | 82 | // Here comes low-level functions - those that directly works with cacher engines |
83 | 83 | // ------------------------------------------------------------------------- |
84 | + |
|
85 | + /** |
|
86 | + * @param string $name |
|
87 | + */ |
|
84 | 88 | public function __set($name, $value) { |
85 | 89 | switch ($name) { |
86 | 90 | case '_MODE': |
@@ -132,6 +136,9 @@ discard block |
||
132 | 136 | return null; |
133 | 137 | } |
134 | 138 | |
139 | + /** |
|
140 | + * @param string $name |
|
141 | + */ |
|
135 | 142 | public function __isset($name) { |
136 | 143 | switch (self::$mode) { |
137 | 144 | case CACHER_NO_CACHE: |
@@ -173,6 +173,9 @@ |
||
173 | 173 | } |
174 | 174 | |
175 | 175 | |
176 | + /** |
|
177 | + * @param string $path |
|
178 | + */ |
|
176 | 179 | protected function lng_try_filepath($path, $file_path_relative) { |
177 | 180 | $file_path = SN_ROOT_PHYSICAL . ($path && file_exists(SN_ROOT_PHYSICAL . $path . $file_path_relative) ? $path : '') . $file_path_relative; |
178 | 181 | return file_exists($file_path) ? $file_path : false; |
@@ -47,6 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | /** |
49 | 49 | * constuctor |
50 | + * @param template $template |
|
50 | 51 | */ |
51 | 52 | function template_compile(&$template) |
52 | 53 | { |
@@ -463,6 +464,7 @@ discard block |
||
463 | 464 | * Compile IF tags - much of this is from Smarty with |
464 | 465 | * some adaptions for our block level methods |
465 | 466 | * @access private |
467 | + * @param boolean $elseif |
|
466 | 468 | */ |
467 | 469 | function compile_tag_if($tag_args, $elseif) |
468 | 470 | { |
@@ -620,6 +622,7 @@ discard block |
||
620 | 622 | /** |
621 | 623 | * Compile DEFINE tags |
622 | 624 | * @access private |
625 | + * @param boolean $op |
|
623 | 626 | */ |
624 | 627 | function compile_tag_define($tag_args, $op) |
625 | 628 | { |
@@ -698,6 +701,7 @@ discard block |
||
698 | 701 | * parse expression |
699 | 702 | * This is from Smarty |
700 | 703 | * @access private |
704 | + * @param string $is_arg |
|
701 | 705 | */ |
702 | 706 | function _parse_is_expr($is_arg, $tokens) |
703 | 707 | { |
@@ -794,6 +798,8 @@ discard block |
||
794 | 798 | * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. |
795 | 799 | * NOTE: does not expect a trailing "." on the blockname. |
796 | 800 | * @access private |
801 | + * @param string $blockname |
|
802 | + * @param boolean $include_last_iterator |
|
797 | 803 | */ |
798 | 804 | function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) |
799 | 805 | { |
@@ -832,6 +838,7 @@ discard block |
||
832 | 838 | /** |
833 | 839 | * Write compiled file to cache directory |
834 | 840 | * @access private |
841 | + * @param string $data |
|
835 | 842 | */ |
836 | 843 | function compile_write($handle, $data) |
837 | 844 | { |
@@ -857,6 +864,7 @@ discard block |
||
857 | 864 | /** |
858 | 865 | * Minifies template w/i PHP code by removing extra spaces |
859 | 866 | * @access private |
867 | + * @return string |
|
860 | 868 | */ |
861 | 869 | function minify($html) |
862 | 870 | { |
@@ -151,6 +151,9 @@ |
||
151 | 151 | } |
152 | 152 | |
153 | 153 | |
154 | + /** |
|
155 | + * @param integer $user_id |
|
156 | + */ |
|
154 | 157 | public function __construct($user_id) { |
155 | 158 | $this->user_change($user_id); |
156 | 159 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | /** |
38 | 38 | * @param float $range_start - Начало диапазона |
39 | 39 | * @param float $range_end - Конец диапазона |
40 | - * @param bool|int $round - До скольки знаков округлять результат. False - не округлять, True - округлять до целого, 1 - округлять до десятков, 2 - до сотен итд |
|
40 | + * @param boolean $round - До скольки знаков округлять результат. False - не округлять, True - округлять до целого, 1 - округлять до десятков, 2 - до сотен итд |
|
41 | 41 | * @param int $strict - В сколько сигм надо уложить результат |
42 | 42 | * @param bool|false $cut_extreme - надо ли обрезать крайние значения. Например, при $strict = 2 их слишком много |
43 | 43 | * |
@@ -128,6 +128,9 @@ |
||
128 | 128 | } |
129 | 129 | } |
130 | 130 | |
131 | + /** |
|
132 | + * @param string $comment |
|
133 | + */ |
|
131 | 134 | protected function commentAdd($comment) { |
132 | 135 | if (empty($this->values[static::COMMENT_PLACEHOLDER])) { |
133 | 136 | $this->query .= static::COMMENT_PLACEHOLDER; |
@@ -134,7 +134,6 @@ discard block |
||
134 | 134 | /** |
135 | 135 | * Попытка залогиниться с использованием метода $method |
136 | 136 | * |
137 | - * @param string $method_name |
|
138 | 137 | */ |
139 | 138 | public function login() { |
140 | 139 | // TODO Проверяем поддерживаемость метода |
@@ -162,6 +161,10 @@ discard block |
||
162 | 161 | * @return array|bool|resource |
163 | 162 | */ |
164 | 163 | // OK v4.5 |
164 | + |
|
165 | + /** |
|
166 | + * @param string $salt_unsafe |
|
167 | + */ |
|
165 | 168 | public function password_change($old_password_unsafe, $new_password_unsafe, $salt_unsafe = null) { |
166 | 169 | $result = parent::password_change($old_password_unsafe, $new_password_unsafe, $salt_unsafe); |
167 | 170 | if($result) { |
@@ -171,6 +174,9 @@ discard block |
||
171 | 174 | return $result; |
172 | 175 | } |
173 | 176 | |
177 | + /** |
|
178 | + * @param Account $account_to_impersonate |
|
179 | + */ |
|
174 | 180 | public function impersonate($account_to_impersonate) { |
175 | 181 | $this->cookie_set($account_to_impersonate); |
176 | 182 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | * <p>true - транзакция должна быть запущена - для совместимости с $for_update</p> |
40 | 40 | * <p>false - всё равно - для совместимости с $for_update</p> |
41 | 41 | * |
42 | - * @return bool Текущий статус транзакции |
|
42 | + * @return null|boolean Текущий статус транзакции |
|
43 | 43 | */ |
44 | 44 | public function check($status = null) { |
45 | 45 | $error_msg = false; |