2017 © Pedro Peláez
 

library psr7-cookies

PSR-7 Cookies

image

hansott/psr7-cookies

PSR-7 Cookies

  • Sunday, March 11, 2018
  • by hansott
  • Repository
  • 1 Watchers
  • 10 Stars
  • 1,624 Installations
  • PHP
  • 7 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 19 % Grown

The README.md

PSR-7 Cookies

Latest Version on Packagist ![Supported PHP versions][ico-php-version] Total Downloads ![Software License][ico-license], (*1)

Install

Via Composer, (*2)

``` bash $ composer require hansott/psr7-cookies, (*3)



## Donate If you like this package, please consider buying me a coffee. Thank you for your support! 🙇‍♂️ <a href="https://www.buymeacoffee.com/hansott" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee"></a> ## Usage ### Add cookie to Psr\Http\Message\ResponseInterface ```php <?php use HansOtt\PSR7Cookies\SetCookie; // Set a cookie with custom values. $cookie = new SetCookie('name', 'value', time() + 3600, '/path', 'domain.tld', $secure, $httpOnly, $sameSite); // Set a cookie to delete a cookie. $cookie = SetCookie::thatDeletesCookie('name'); // Set a cookie that stays forever (5 years) $cookie = SetCookie::thatStaysForever('name', 'value'); // Set a cookie that expires at a given time. $now = new DateTimeImmutable(); $tomorrow = $now->modify('tomorrow'); $cookie = SetCookie::thatExpires('name', 'value', $tomorrow); // Add the cookie to a response $responseWithCookie = $cookie->addToResponse($response);

Testing

bash $ composer test, (*4)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*5)

Security

If you discover any security related issues, please email hans at iott consulting instead of using the issue tracker., (*6)

Credits

License

The MIT License (MIT). Please see License File for more information., (*7)

The Versions

11/03 2018

dev-master

9999999-dev https://github.com/hansott/psr7-cookies

PSR-7 Cookies

  Sources   Download

MIT

The Requires

 

The Development Requires

fig cookies http-message hansott psr7-cookies setcookie

11/03 2018

2.0.0

2.0.0.0 https://github.com/hansott/psr7-cookies

PSR-7 Cookies

  Sources   Download

MIT

The Requires

 

The Development Requires

fig cookies http-message hansott psr7-cookies setcookie

10/07 2016

1.0.1

1.0.1.0 https://github.com/hansott/psr7-cookies

PSR-7 Cookies

  Sources   Download

MIT

The Requires

 

The Development Requires

fig cookies http-message hansott psr7-cookies setcookie

02/07 2016

1.0.0

1.0.0.0 https://github.com/hansott/psr7-cookies

PSR-7 Cookies

  Sources   Download

MIT

The Requires

 

The Development Requires

fig cookies http-message hansott psr7-cookies setcookie