public function write(
        string $sKey,
        string $sValue,
        int $iTTL = null,
        string $sPath = '',
        string $sDomain = '',
        bool $bSecure = false,
        bool $bHttpOnly = false
    ): bool {
        if (setcookie($sKey, $sValue, $iTTL ? time() + $iTTL : 0, $sPath, $sDomain, $bSecure, $bHttpOnly)) {
            $this->aCookies[$sKey] = Factory::resource(
                'Cookie',
                null,
                (object) [
                    'key'   => $sKey,
                    'value' => $sValue,
                ]
            );
            return true;
        }

        return false;
    }