*/
public function &listFolders()
{
- $this->initiateCache();
+ $this->_initiateCache();
$result = array_keys($this->_list);
return $result;
}
*
* @return array An array of Horde_Kolab_Storage_Folder objects.
*/
- function getFolders($folders = null)
+ public function getFolders($folders = null)
{
if (!isset($folders)) {
$folders = $this->listFolders();
*
* @return Horde_Kolab_Storage_Folder The Kolab folder object.
*/
- function &getFolder($folder)
+ public function &getFolder($folder)
{
if (!isset($this->_folders[$folder])) {
$result = $this->getConnection($folder);
*
* @return Horde_Kolab_Storage_Folder The new Kolab folder object.
*/
- function getNewFolder($connection = null)
+ public function getNewFolder($connection = null)
{
if (empty($connection) || !isset($this->connections[$connection])) {
$connection = &$this->connections['BASE'];
*
* @return Horde_Kolab_Storage_Folder The Kolab folder object.
*/
- function getByShare($share, $type)
+ public function getByShare($share, $type)
{
- $folder = $this->parseShare($share, $type);
+ $folder = $this->_parseShare($share, $type);
return $this->getFolder($folder);
}
*
* @return Horde_Kolab_Storage_Folder The list of Kolab folder objects.
*/
- function getByType($type)
+ public function getByType($type)
{
- $this->initiateCache();
+ $this->_initiateCache();
if (isset($this->_types[$type])) {
return $this->getFolders($this->_types[$type]);
} else {
*
* @return mixed The default folder, false if there is no default.
*/
- function getDefault($type)
+ public function getDefault($type)
{
- $this->initiateCache();
+ $this->_initiateCache();
if (isset($this->_defaults[$this->_owner][$type])) {
return $this->getFolder($this->_defaults[$this->_owner][$type]);
} else {
*
* @return mixed The default folder, false if there is no default.
*/
- function getForeignDefault($owner, $type)
+ public function getForeignDefault($owner, $type)
{
- $this->initiateCache();
+ $this->_initiateCache();
if (isset($this->_defaults[$owner][$type])) {
return $this->getFolder($this->_defaults[$owner][$type]);
} else {
*
* @return string The corrected folder name.
*/
- function parseShare($share, $type)
+ private function _parseShare($share, $type)
{
// Handle default shares
if (class_exists('Horde_Auth')
*
* @return NULL
*/
- function initiateCache()
+ private function _initiateCache()
{
if (isset($this->_list) && isset($this->_types) && isset($this->_defaults)) {
return;
*
* @return NULL
*/
- function addToCache(&$folder)
+ public function addToCache(&$folder)
{
- $this->initiateCache();
+ $this->_initiateCache();
try {
$type = $folder->getType();
*
* @return NULL
*/
- function removeFromCache(&$folder)
+ public function removeFromCache(&$folder)
{
- $this->initiateCache();
+ $this->_initiateCache();
unset($this->_folders[$folder->name]);
if (isset($this->_list)) {