Overview

Packages

  • Mnemo
  • None

Classes

  • Mnemo
  • Mnemo_Ajax_Application
  • Mnemo_Ajax_Imple_EditNote
  • Mnemo_Api
  • Mnemo_Driver
  • Mnemo_Driver_Kolab
  • Mnemo_Driver_Sql
  • Mnemo_Exception
  • Mnemo_Factory_Driver
  • Mnemo_Factory_Notepads
  • Mnemo_Form_CreateNotepad
  • Mnemo_Form_DeleteNotepad
  • Mnemo_Form_EditNotepad
  • Mnemo_Notepads_Base
  • Mnemo_Notepads_Default
  • Mnemo_Notepads_Kolab
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * The default notepads handler.
 4:  *
 5:  * PHP version 5
 6:  *
 7:  * @category Horde
 8:  * @package  Mnemo
 9:  * @author   Jon Parise <jon@horde.org>
10:  * @author   Gunnar Wrobel <wrobel@pardus.de>
11:  * @license  http://www.horde.org/licenses/apache
12:  * @link     http://www.horde.org/apps/mnemo
13:  */
14: 
15: /**
16:  * The default notepads handler.
17:  *
18:  * Copyright 2001-2012 Horde LLC (http://www.horde.org/)
19:  *
20:  * See the enclosed file LICENSE for license information (ASL). If you
21:  * did not receive this file, see http://www.horde.org/licenses/apache.
22:  *
23:  * @category Horde
24:  * @package  Mnemo
25:  * @author   Jon Parise <jon@horde.org>
26:  * @author   Gunnar Wrobel <wrobel@pardus.de>
27:  * @license  http://www.horde.org/licenses/apache
28:  * @link     http://www.horde.org/apps/mnemo
29:  */
30: class Mnemo_Notepads_Default
31: extends Mnemo_Notepads_Base
32: {
33:     /**
34:      * The current identity.
35:      *
36:      * @var Horde_Prefs_Identity
37:      */
38:     private $_identity;
39: 
40:     /**
41:      * Constructor.
42:      *
43:      * @param Horde_Share_Base $shares The share backend.
44:      * @param string           $user   The current user.
45:      * @param array            $params Additional parameters.
46:      */
47:     public function __construct($shares, $user, $params)
48:     {
49:         if (!isset($params['identity'])) {
50:             throw new Mnemo_Exception('This notepad handler needs an "identity" parameter!');
51:         } else {
52:             $this->_identity = $params['identity'];
53:             unset($params['identity']);
54:         }
55:         parent::__construct($shares, $user, $params);
56:     }
57: 
58:     /**
59:      * Return the name of the default share.
60:      *
61:      * @return string The name of a default share.
62:      */
63:     protected function getDefaultShareName()
64:     {
65:         return sprintf(_("Notepad of %s"), $this->_identity->getName());
66:     }
67: }
API documentation generated by ApiGen