/** * {@inheritdoc} * * @param null|array $options * @throws \Phalcon\Mvc\Model\Exception */ public function __construct($options = null) { if (!is_array($options)) { throw new Exception('No configuration given'); } if (!isset($options['redis'])) { throw new Exception('Parameter "redis" is required'); } parent::__construct($options); }
/** * {@inheritdoc} * * @param null|array $options options array * * @throws \Phalcon\Mvc\Model\Exception */ public function __construct($options = null) { if (!is_array($options)) { throw new Exception('No configuration given'); } if (!isset($options['host'])) { throw new Exception('No host given in options'); } if (!isset($options['port'])) { $options['port'] = self::$defaultPort; } if (!isset($options['weight'])) { $options['weight'] = self::$defaultWeight; } parent::__construct($options); }