Overview

Packages

  • None
  • Vilma

Classes

  • Vilma
  • Vilma_Api
  • Vilma_Driver
  • Vilma_Driver_Qmailldap
  • Vilma_Driver_Sql
  • Vilma_Form_DeleteDomain
  • Vilma_Form_EditAlias
  • Vilma_Form_EditDomain
  • Vilma_Form_EditForward
  • Vilma_Form_EditUser
  • Vilma_MailboxDriver
  • Vilma_MailboxDriver_Hooks
  • Vilma_MailboxDriver_Imap
  • Vilma_MailboxDriver_Maildrop
  • Vilma_MailboxDriver_Null
  • Vilma_Test
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Copyright 2006-2007 Alkaloid Networks <http://www.alkaloid.net/>
 4:  *
 5:  * See the enclosed file LICENSE for license information (BSD). If you did not
 6:  * did not receive this file, see http://cvs.horde.org/co.php/vilma/LICENSE.
 7:  *
 8:  * @author  Ben Klang <bklang@alkaloid.net>
 9:  * @package Vilma
10:  */
11: 
12: class Vilma_MailboxDriver_Hooks extends Vilma_MailboxDriver
13: {
14:     /**
15:      * Creates a new mailbox.
16:      *
17:      * @param string $user    The name of the mailbox to create.
18:      * @param string $domain  The name of the domain in which to create the
19:      *                        mailbox.
20:      *
21:      * @throws Vilma_Exception
22:      */
23:     public function createMailbox($user, $domain)
24:     {
25:         try {
26:             return Horde::callHook('createMailbox', array($user, $domain), 'vilma');
27:         } catch (Exception $e) {
28:             throw new Vilma_Exception($e);
29:         }
30:     }
31: 
32:     /**
33:      * Deletes an existing mailbox.
34:      *
35:      * @todo
36:      *
37:      * @param string $user    The name of the mailbox to delete.
38:      * @param string $domain  The name of the domain in which to delete the
39:      *                        mailbox.
40:      *
41:      * @throws Vilma_Exception
42:      */
43:     public function deleteMailbox($user, $domain)
44:     {
45:         try {
46:             return Horde::callHook('deleteMailbox', array($user, $domain), 'vilma');
47:         } catch (Exception $e) {
48:             throw new Vilma_Exception($e);
49:         }
50:     }
51: 
52:     /**
53:      * Checks whether a mailbox exists and is set up properly.
54:      *
55:      * @param string $user    The name of the mailbox to check.
56:      * @param string $domain  The mailbox' domain.
57:      *
58:      * @return boolean  True if the mailbox exists.
59:      * @throws Vilma_Exception if the mailbox doesn't exist.
60:      */
61:     public function checkMailbox($user, $domain)
62:     {
63:         try {
64:             return Horde::callHook('checkMailbox', array($user, $domain), 'vilma');
65:         } catch (Exception $e) {
66:             throw new Vilma_Exception($e);
67:         }
68:     }
69: }
70: 
API documentation generated by ApiGen