__construct() 공개 메소드

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
 /**
  * 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
 /**
  * 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);
 }