Horde_Share_Base::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $app, string $user, Horde_Perms_Base $perms, Horde_Group_Base $groups )
$app string The application that the shares belong to.
$user string The current user.
$perms Horde_Perms_Base The permissions object.
$groups Horde_Group_Base The Horde_Group driver.
    public function __construct($app, $user, Horde_Perms_Base $perms, Horde_Group_Base $groups)
    {
        $this->_app = $app;
        $this->_user = $user;
        $this->_permsObject = $perms;
        $this->_groups = $groups;
        $this->_logger = new Horde_Support_Stub();
    }

Usage Example

Example #1
0
 /**
  * Constructor.
  *
  * @param string $app               The application that the shares belong
  *                                  to
  * @param string $user              The current user
  * @param Horde_Perms_Base $perms   The permissions object
  * @param Horde_Group_Base $groups  The Horde_Group driver.
  *
  */
 public function __construct($app, $user, Horde_Perms_Base $perms, Horde_Group_Base $groups)
 {
     switch ($app) {
         case 'mnemo':
         case 'jonah':
             $this->_type = 'note';
             break;
         case 'kronolith':
             $this->_type = 'event';
             break;
         case 'turba':
             $this->_type = 'contact';
             break;
         case 'nag':
             $this->_type = 'task';
             break;
         default:
             throw new Horde_Share_Exception(sprintf(Horde_Share_Translation::t("The Horde/Kolab integration engine does not support \"%s\""), $app));
     }
     parent::__construct($app, $user, $perms, $groups);
 }
All Usage Examples Of Horde_Share_Base::__construct