__construct() public method

Constructor.
public __construct ( array $params = [] )
$params array A hash with any parameters that this calendar might need.
コード例 #1
0
ファイル: Holiday.php プロジェクト: horde/horde
 /**
  * Constructor.
  *
  * @param array $params  A hash with any parameters that this calendar
  *                       might need.
  *                       Required parameters:
  *                       - share: The share of this calendar.
  */
 public function __construct($params = array())
 {
     if (!isset($params['driver'])) {
         throw new BadMethodCallException('driver parameter is missing');
     }
     parent::__construct($params);
 }
コード例 #2
0
ファイル: Tasks.php プロジェクト: DSNS-LAB/Dmail
 /**
  * Constructor.
  *
  * @param array $params  A hash with any parameters that this calendar
  *                       might need.
  *                       Required parameters:
  *                       - share: The share of this calendar.
  */
 public function __construct($params = array())
 {
     if (!isset($params['share'])) {
         throw new BadMethodCallException('share parameter is missing');
     }
     Kronolith_Calendar::__construct($params);
 }
コード例 #3
0
ファイル: Resource.php プロジェクト: raz0rsdge/horde
 /**
  * Constructor.
  *
  * @param array $params  A hash with any parameters that this calendar
  *                       might need.
  *                       Required parameters:
  *                       - share: The share of this calendar.
  */
 public function __construct($params = array())
 {
     if (!isset($params['resource'])) {
         throw new BadMethodCallException('resource parameter is missing.');
     }
     if (!$params['resource'] instanceof Kronolith_Resource_Single) {
         throw new InvalidArgumentException('resource parameter is not a Kronolith_Resource_Single object.');
     }
     parent::__construct($params);
 }
コード例 #4
0
ファイル: Internal.php プロジェクト: jubinpatel/horde
 /**
  * Constructor.
  *
  * @param array $params  A hash with any parameters that this calendar
  *                       might need.
  *                       Required parameters:
  *                       - share: The share of this calendar.
  */
 public function __construct($params = array())
 {
     if (!isset($params['share'])) {
         throw new BadMethodCallException('share parameter is missing');
     }
     if (!$params['share'] instanceof Horde_Share_Object) {
         throw new InvalidArgumentException('share parameter is not a Horde_Share_Object');
     }
     parent::__construct($params);
 }
コード例 #5
0
ファイル: External.php プロジェクト: horde/horde
 /**
  * Constructor.
  *
  * @param array $params  A hash with any parameters that this calendar
  *                       might need.
  */
 public function __construct($params = array())
 {
     if (!isset($params['name'])) {
         throw new BadMethodCallException('name parameter is missing');
     }
     if (!isset($params['id'])) {
         throw new BadMethodCallException('id parameter is missing');
     }
     if (!isset($params['api'])) {
         throw new BadMethodCallException('api parameter is missing');
     }
     if (!empty($params['type'])) {
         $this->_type = $params['type'];
     }
     parent::__construct($params);
 }
コード例 #6
0
ファイル: Remote.php プロジェクト: DSNS-LAB/Dmail
 /**
  * Constructor.
  *
  * @param array $params  A hash with any parameters that this calendar
  *                       might need.
  *                       Required parameters:
  *                       - share: The share of this calendar.
  */
 public function __construct($params = array())
 {
     if (!isset($params['url'])) {
         throw new BadMethodCallException('url parameter is missing');
     }
     if (!isset($params['name'])) {
         throw new BadMethodCallException('name parameter is missing');
     }
     $key = $GLOBALS['registry']->getAuthCredential('password');
     if ($key) {
         $secret = $GLOBALS['injector']->getInstance('Horde_Secret');
         if (!empty($params['user'])) {
             $params['user'] = $secret->read($key, base64_decode($params['user']));
         }
         if (!empty($params['password'])) {
             $params['password'] = $secret->read($key, base64_decode($params['password']));
         }
     }
     parent::__construct($params);
 }