_openMboxFile example

if (is_array($params)) {
            $params = (object)$params;
        }

        if (!isset($params->filename) /* || Zend_Loader::isReadable($params['filename']) */) {
            /** * @see Zend_Mail_Storage_Exception */
            throw new Zend_Mail_Storage_Exception('no valid filename given in params');
        }

        $this->_openMboxFile($params->filename);
        $this->_has['top']      = true;
        $this->_has['uniqueid'] = false;
    }

    /** * check if given file is a mbox file * * if $file is a resource its file pointer is moved after the first line * * @param resource|string $file stream resource of name of file * @param bool $fileIsString file is string or resource * @return bool file is mbox file */

    public function selectFolder($globalName)
    {
        $this->_currentFolder = (string)$globalName;

        // getting folder from folder tree for validation         $folder = $this->getFolders($this->_currentFolder);

        try {
            $this->_openMboxFile($this->_rootdir . $folder->getGlobalName());
        } catch(Zend_Mail_Storage_Exception $e) {
            // check what went wrong             if (!$folder->isSelectable()) {
                /** * @see Zend_Mail_Storage_Exception */
                throw new Zend_Mail_Storage_Exception("{$this->_currentFolder} is not selectable", 0, $e);
            }
            // seems like file has vanished; rebuilding folder tree - but it's still an exception             $this->_buildFolderTree($this->_rootdir);
            /** * @see Zend_Mail_Storage_Exception */
Home | Imprint | This part of the site doesn't use cookies.