| @@ 52-60 (lines=9) @@ | ||
| 49 | $this->backup_filename = strtolower( sanitize_file_name( remove_accents( $filename ) ) ); |
|
| 50 | } |
|
| 51 | ||
| 52 | public function get_errors( $context = null ) { |
|
| 53 | ||
| 54 | if ( ! empty( $context ) ) { |
|
| 55 | return isset( $this->errors[ $context ] ) ? $this->errors[ $context ] : array(); |
|
| 56 | } |
|
| 57 | ||
| 58 | return $this->errors; |
|
| 59 | ||
| 60 | } |
|
| 61 | ||
| 62 | public function error( $context, $error ) { |
|
| 63 | ||
| @@ 94-102 (lines=9) @@ | ||
| 91 | ||
| 92 | } |
|
| 93 | ||
| 94 | public function get_warnings( $context = null ) { |
|
| 95 | ||
| 96 | if ( ! empty( $context ) ) { |
|
| 97 | return isset( $this->warnings[ $context ] ) ? $this->warnings[ $context ] : array(); |
|
| 98 | } |
|
| 99 | ||
| 100 | return $this->warnings; |
|
| 101 | ||
| 102 | } |
|
| 103 | ||
| 104 | private function warning( $context, $warning ) { |
|
| 105 | ||
| @@ 1374-1382 (lines=9) @@ | ||
| 1371 | * Get the errors |
|
| 1372 | * |
|
| 1373 | */ |
|
| 1374 | public function get_errors( $context = null ) { |
|
| 1375 | ||
| 1376 | if ( ! empty( $context ) ) { |
|
| 1377 | return isset( $this->errors[ $context ] ) ? $this->errors[ $context ] : array(); |
|
| 1378 | } |
|
| 1379 | ||
| 1380 | return $this->errors; |
|
| 1381 | ||
| 1382 | } |
|
| 1383 | ||
| 1384 | /** |
|
| 1385 | * Add an error to the errors stack |
|
| @@ 1433-1441 (lines=9) @@ | ||
| 1430 | * Get the warnings |
|
| 1431 | * |
|
| 1432 | */ |
|
| 1433 | public function get_warnings( $context = null ) { |
|
| 1434 | ||
| 1435 | if ( ! empty( $context ) ) { |
|
| 1436 | return isset( $this->warnings[ $context ] ) ? $this->warnings[ $context ] : array(); |
|
| 1437 | } |
|
| 1438 | ||
| 1439 | return $this->warnings; |
|
| 1440 | ||
| 1441 | } |
|
| 1442 | ||
| 1443 | /** |
|
| 1444 | * Add an warning to the warnings stack |
|