src/Http/Cookie/Cookie.php
public function toString()
    {
        $parts = [];
        $data = $this->data();
        $parts[] = $data['name'] . '=' . rawurlencode($data['value']);

        if ($data['domain']) {
            $parts[] = 'Domain=' . $data['domain'];
        }
        if ($data['path']) {
            $parts[] = 'Path=' . $data['path'];
        }
        if (isset($data['max-age'])) {
            $parts[] = 'Max-Age=' . (string) $data['max-age'];
        } elseif (isset($data['expires'])) {
            $parts[] = 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $data['expires']);
        }
        if ($data['secure']) {
            $parts[] = 'Secure';
        }
        if ($data['httponly']) {
            $parts[] = 'HttpOnly';
        }
        return join('; ', $parts);
    }
public function toString()
    {
        $parts = [];
        $data = $this->data();
        $parts[] = $data['name'] . '=' . rawurlencode($data['value']);

        if ($data['domain']) {
            $parts[] = 'Domain=' . $data['domain'];
        }
        if ($data['path']) {
            $parts[] = 'Path=' . $data['path'];
        }
        if (isset($data['max-age'])) {
            $parts[] = 'Max-Age=' . (string) $data['max-age'];
        } elseif (isset($data['expires'])) {
            $parts[] = 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $data['expires']);
        }
        if ($data['secure']) {
            $parts[] = 'Secure';
        }
        if ($data['httponly']) {
            $parts[] = 'HttpOnly';
        }
        return join('; ', $parts);
    }
public function toString ( ) { $ parts = [ ] ; $ data = $ this -> data ( ) ; $ parts [ ] = $ data [ 'name' ] . '=' . rawurlencode ( $ data [ 'value' ] ) ; if ( $ data [ 'domain' ] ) { $ parts [ ] = 'Domain=' . $ data [ 'domain' ] ; } if ( $ data [ 'path' ] ) { $ parts [ ] = 'Path=' . $ data [ 'path' ] ; } if ( isset ( $ data [ 'max-age' ] ) ) { $ parts [ ] = 'Max-Age=' . ( string ) $ data [ 'max-age' ] ; } elseif ( isset ( $ data [ 'expires' ] ) ) { $ parts [ ] = 'Expires=' . gmdate ( 'D, d M Y H:i:s \G\M\T' , $ data [ 'expires' ] ) ; } if ( $ data [ 'secure' ] ) { $ parts [ ] = 'Secure' ; } if ( $ data [ 'httponly' ] ) { $ parts [ ] = 'HttpOnly' ; } return join ( '; ' , $ parts ) ; }
Return a Set-Cookie string representation of a Cookie.

@param  string $cookie The Cookie.
@return string
Return a Set - Cookie string representation of a Cookie .