_buildFolderTree example



        if (!isset($params->dirname) || !is_dir($params->dirname)) {
            /** * @see Zend_Mail_Storage_Exception */
            throw new Zend_Mail_Storage_Exception('no valid dirname given in params');
        }

        $this->_rootdir = rtrim($params->dirname, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;

        $this->_buildFolderTree($this->_rootdir);
        $this->selectFolder(!empty($params->folder) ? $params->folder : 'INBOX');
        $this->_has['top']      = true;
        $this->_has['uniqueid'] = false;
    }

    /** * find all subfolders and mbox files for folder structure * * Result is save in Zend_Mail_Storage_Folder instances with the root in $this->_rootFolder. * $parentFolder and $parentGlobalName are only used internally for recursion. * * @param string $currentDir call with root dir, also used for recursion. * @param Zend_Mail_Storage_Folder|null $parentFolder used for recursion * @param string $parentGlobalName used for rescursion * @return null * @throws Zend_Mail_Storage_Exception */
if (!isset($params->dirname) || !is_dir($params->dirname)) {
            /** * @see Zend_Mail_Storage_Exception */
            throw new Zend_Mail_Storage_Exception('no valid dirname given in params');
        }

        $this->_rootdir = rtrim($params->dirname, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;

        $this->_delim = isset($params->delim) ? $params->delim : '.';

        $this->_buildFolderTree();
        $this->selectFolder(!empty($params->folder) ? $params->folder : 'INBOX');
        $this->_has['top'] = true;
        $this->_has['flags'] = true;
    }

    /** * find all subfolders and mbox files for folder structure * * Result is save in Zend_Mail_Storage_Folder instances with the root in $this->_rootFolder. * $parentFolder and $parentGlobalName are only used internally for recursion. * * @return null * @throws Zend_Mail_Storage_Exception */
Home | Imprint | This part of the site doesn't use cookies.