| @@ 188-196 (lines=9) @@ | ||
| 185 | * |
|
| 186 | * @return string |
|
| 187 | */ |
|
| 188 | public static function wrapInSlashBegin($path, $wrapper = DIRECTORY_SEPARATOR, $clearEnd = true) |
|
| 189 | {
|
|
| 190 | $path = preg_replace("/(^\\{$wrapper})/", '', $path);
|
|
| 191 | ||
| 192 | if( $clearEnd ) |
|
| 193 | preg_replace("/(\\{$wrapper})$/", '', $path);
|
|
| 194 | ||
| 195 | return $wrapper.$path; |
|
| 196 | } |
|
| 197 | ||
| 198 | /** |
|
| 199 | * Оборачивает конец путь в слеш, исключаея дублирование |
|
| @@ 206-214 (lines=9) @@ | ||
| 203 | * |
|
| 204 | * @return string |
|
| 205 | */ |
|
| 206 | public static function wrapInSlashEnd($path, $wrapper = DIRECTORY_SEPARATOR, $clearBegin = true) |
|
| 207 | {
|
|
| 208 | $path = preg_replace("/(\\{$wrapper}$)/", '', $path);
|
|
| 209 | ||
| 210 | if( $clearBegin ) |
|
| 211 | preg_replace("/(^\\{$wrapper})/", '', $path);
|
|
| 212 | ||
| 213 | return $path.$wrapper; |
|
| 214 | } |
|
| 215 | ||
| 216 | /** |
|
| 217 | * @param string $table |
|