public __construct ( boolean $isSsl = false ) | ||
$isSsl | boolean |
public function __construct($isSsl = false)
{
if (!is_bool($isSsl)) {
throw new \InvalidArgumentException('First constructor argument "isSSL" must be boolean');
}
if ($isSsl) {
$this->uriScheme .= 's';
$this->endpoint = str_replace('www', 'ssl', $this->endpoint);
}
}
/** * Override __construct() to store whether or not we should be sending Analytics data * * @param bool $isSsl */ public function __construct($isSsl = false) { $this->shouldSendAnalytics = craft()->instantAnalytics->shouldSendAnalytics(); return parent::__construct($isSsl); }