src/IMAP/Client.php
public function openFolder($folder_path, $attempts = 3) {
        $this->checkConnection();

        if(property_exists($folder_path, 'path')) {
            $folder_path = $folder_path->path;
        }

        if ($this->active_folder !== $folder_path) {
            $this->active_folder = $folder_path;

            imap_reopen($this->getConnection(), $folder_path, $this->getOptions(), $attempts);
        }
    }
public function openFolder($folder_path, $attempts = 3) {
        $this->checkConnection();

        if(property_exists($folder_path, 'path')) {
            $folder_path = $folder_path->path;
        }

        if ($this->active_folder !== $folder_path) {
            $this->active_folder = $folder_path;

            imap_reopen($this->getConnection(), $folder_path, $this->getOptions(), $attempts);
        }
    }
public function openFolder ( $ folder_path , $ attempts = 3 ) { $ this -> checkConnection ( ) ; if ( property_exists ( $ folder_path , 'path' ) ) { $ folder_path = $ folder_path -> path ; } if ( $ this -> active_folder !== $ folder_path ) { $ this -> active_folder = $ folder_path ; imap_reopen ( $ this -> getConnection ( ) , $ folder_path , $ this -> getOptions ( ) , $ attempts ) ; } }
Open folder.

@param string|Folder $folder_path
@param int           $attempts

@throws ConnectionFailedException
Open folder .