public function initSessionSecurity($ssl = self::DEFAULT_SEC_FLAG_SSL, $httpOnly = self::DEFAULT_SEC_FLAG_HTTPONLY)
    {
        // ssl (secured transmission)
        if ($ssl) {
            // set ssl to enabled if 1) configured TRUE and supported by server!
            $this->setSsl(
                is_ssl() && $this->getFlagStatus('ssl')
            );
        } else {
            $this->setSsl(false);
        }

        // http-only (e.g. prevent JavaScript access to cookie ...)
        if ($httpOnly) {
            // set ssl to enabled if 1) configured TRUE and supported by server!
            $this->setHttpOnly(
                $this->getFlagStatus('httpOnly')
            );
        } else {
            $this->setHttpOnly(false);
        }
    }
public function initSessionSecurity($ssl = self::DEFAULT_SEC_FLAG_SSL, $httpOnly = self::DEFAULT_SEC_FLAG_HTTPONLY)
    {
        // ssl (secured transmission)
        if ($ssl) {
            // set ssl to enabled if 1) configured TRUE and supported by server!
            $this->setSsl(
                is_ssl() && $this->getFlagStatus('ssl')
            );
        } else {
            $this->setSsl(false);
        }

        // http-only (e.g. prevent JavaScript access to cookie ...)
        if ($httpOnly) {
            // set ssl to enabled if 1) configured TRUE and supported by server!
            $this->setHttpOnly(
                $this->getFlagStatus('httpOnly')
            );
        } else {
            $this->setHttpOnly(false);
        }
    }
public function initSessionSecurity ( $ ssl = self :: DEFAULT_SEC_FLAG_SSL , $ httpOnly = self :: DEFAULT_SEC_FLAG_HTTPONLY ) { // ssl (secured transmission) if ( $ ssl ) { // set ssl to enabled if 1) configured TRUE and supported by server! $ this -> setSsl ( is_ssl ( ) && $ this -> getFlagStatus ( 'ssl' ) ) ; } else { $ this -> setSsl ( false ) ; } // http-only (e.g. prevent JavaScript access to cookie ...) if ( $ httpOnly ) { // set ssl to enabled if 1) configured TRUE and supported by server! $ this -> setHttpOnly ( $ this -> getFlagStatus ( 'httpOnly' ) ) ; } else { $ this -> setHttpOnly ( false ) ; } }
Setup security settings of session.

@param bool $ssl      TRUE to enable ssl flag for cookies/session, FALSE to do not
@param bool $httpOnly TRUE to enable httpOnly flag for cookies/session, FALSE to do not

@author Benjamin Carl <opensource@clickalicious.de>
Setup security settings of session .