PHP Class Mnemo_Notepads_Base, horde

Copyright 2001-2016 Horde LLC (http://www.horde.org/) See the enclosed file LICENSE for license information (ASL). If you did not receive this file, see http://www.horde.org/licenses/apache.
Author: Jon Parise ([email protected])
Author: Gunnar Wrobel ([email protected])
Show file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_params array Additional parameters for the notepad handling.
$_shares Horde_Share_Base The share backend.
$_user string The current user.

Public Methods

Method Description
__construct ( Horde_Share_Base $shares, string $user, array $params ) Constructor.
ensureDefaultShare ( ) : string | null Ensure the share system has a default notepad share for the current user if the default share feature is activated.
getDefaultShare ( ) : string Returns the default share's ID, if it can be determined from the share backend.
setDefaultShare ( string $share ) Runs any actions after setting a new default tasklist.

Protected Methods

Method Description
_getDefaultShareName ( ) : string Return the name of the default share.
_prepareDefaultShare ( Horde_Share_Object $share ) Add any modifiers required to the share in order to mark it as default.

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Share_Base $shares, string $user, array $params )
$shares Horde_Share_Base The share backend.
$user string The current user.
$params array Additional parameters.

_getDefaultShareName() abstract protected method

Return the name of the default share.
abstract protected _getDefaultShareName ( ) : string
return string The name of a default share.

_prepareDefaultShare() protected method

Add any modifiers required to the share in order to mark it as default.
protected _prepareDefaultShare ( Horde_Share_Object $share )
$share Horde_Share_Object The new default share.

ensureDefaultShare() public method

Ensure the share system has a default notepad share for the current user if the default share feature is activated.
public ensureDefaultShare ( ) : string | null
return string | null The id of the new default share or NULL if no share was created.

getDefaultShare() public method

Returns the default share's ID, if it can be determined from the share backend.
public getDefaultShare ( ) : string
return string The default share ID.

setDefaultShare() public method

Runs any actions after setting a new default tasklist.
public setDefaultShare ( string $share )
$share string The default share ID.

Property Details

$_params protected property

Additional parameters for the notepad handling.
protected array $_params
return array

$_shares protected property

The share backend.
protected Horde_Share_Base $_shares
return Horde_Share_Base

$_user protected property

The current user.
protected string $_user
return string