| @@ -33,9 +33,9 @@ | ||
| 33 | 33 | $this->file_path = $file_path; |
| 34 | 34 | if (file_exists($this->file_path)) { |
| 35 | 35 | $this->file_handle = fopen($this->file_path, 'r'); |
| 36 | 36 | } else { |
| 37 | - throw new FileException("File Not Found: " . $file_path); | |
| 37 | + throw new FileException(sprintf(__("File Not Found: %s", 'jc-importer'), $file_path)); | |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | public function __destruct() |
| @@ -70,14 +70,14 @@ | ||
| 70 | 70 | { |
| 71 | 71 | return $this->getRecord($this->current_record - 1); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - protected function saveFilePosition() | |
| 74 | + public function saveFilePosition() | |
| 75 | 75 | { |
| 76 | 76 | $this->current_file_position = ftell($this->file_handle); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - protected function loadFilePosition($record = 0) | |
| 79 | + public function loadFilePosition($record = 0) | |
| 80 | 80 | { |
| 81 | 81 | |
| 82 | 82 | if ($this->current_file_position >= 0) { |
| 83 | 83 | fseek($this->file_handle, $this->current_file_position); |
| @@ -87,17 +87,17 @@ | ||
| 87 | 87 | /** |
| 88 | 88 | * @return resource |
| 89 | 89 | * @throws FileException |
| 90 | 90 | */ |
| 91 | - protected function getFileHandle() | |
| 91 | + public function getFileHandle() | |
| 92 | 92 | { |
| 93 | 93 | if (!in_array(get_resource_type($this->file_handle), array('stream', 'file'), true)) { |
| 94 | - throw new FileException("File not found: " . $this->file_path); | |
| 94 | + throw new FileException(sprintf(__("File not found: %s", 'jc-importer'), $this->file_path)); | |
| 95 | 95 | } |
| 96 | 96 | return $this->file_handle; |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - protected function setCurrentRecord($index) | |
| 99 | + public function setCurrentRecord($index) | |
| 100 | 100 | { |
| 101 | 101 | $this->current_record = $index; |
| 102 | 102 | } |
| 103 | 103 | } |