+ private function open()
+ {
+ if ($this->inbox == Banana::$group) {
+ return;
+ }
+ $filename = $this->getFileName();
+ if (is_null($filename)) {
+ return;
+ }
+ $this->file = @fopen($filename, 'r');
+ if (!$this->file) {
+ $this->file = null;
+ $this->filesize = 0;
+ } else {
+ $this->filesize = filesize($filename);
+ }
+ $this->current_id = 0;
+ $this->at_beginning = true;
+ $this->inbox = Banana::$group;
+ }
+
+ private function close()
+ {
+ if (is_null($this->file)) {
+ return;
+ }
+ fclose($this->file);
+ $this->inbox = null;
+ $this->file = null;
+ $this->filesize = null;
+ $this->current_id = null;
+ $this->at_beginning = false;
+ $this->file_cache = null;
+ $this->count = null;
+ $this->new_messages = null;
+ $this->messages = null;
+ }
+