Skip to content

Commit

Permalink
docs: improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
josantonius committed Aug 10, 2022
1 parent 1a77d1c commit 278c002
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/lang/es-ES/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ Cookie::options(
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->set('foo', 'bar');
```

Expand All @@ -347,6 +349,8 @@ Cookie::set('foo', 'bar');
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->set('foo', 'bar', time() + 3600);
```

Expand All @@ -361,6 +365,8 @@ Cookie::set('foo', 'bar', new DateTime('now +1 hour'));
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->replace([
'foo' => 'bar',
'bar' => 'foo'
Expand All @@ -381,6 +387,8 @@ Cookie::replace([
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->replace([
'foo' => 'bar',
'bar' => 'foo'
Expand All @@ -401,6 +409,8 @@ Cookie::replace([
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->get('foo'); // null si la cookie no existe
```

Expand All @@ -415,6 +425,8 @@ Cookie::get('foo'); // null si la cookie no existe
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->get('foo', false); // false si la cookie no existe
```

Expand All @@ -429,6 +441,8 @@ Cookie::get('foo', false); // false si la cookie no existe
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->all();
```

Expand All @@ -443,6 +457,8 @@ Cookie::all();
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->has('foo');
```

Expand All @@ -457,6 +473,8 @@ Cookie::has('foo');
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->pull('foo'); // null si el atributo no existe
```

Expand All @@ -471,6 +489,8 @@ Cookie::pull('foo'); // null si el atributo no existe
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->pull('foo', false); // false si el atributo no existe
```

Expand All @@ -485,6 +505,8 @@ Cookie::pull('foo', false); // false si el atributo no existe
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->remove('foo');
```

Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ Cookie::options(
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->set('foo', 'bar');
```

Expand All @@ -347,6 +349,8 @@ Cookie::set('foo', 'bar');
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->set('foo', 'bar', time() + 3600);
```

Expand All @@ -361,6 +365,8 @@ Cookie::set('foo', 'bar', new DateTime('now +1 hour'));
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->replace([
'foo' => 'bar',
'bar' => 'foo'
Expand All @@ -381,6 +387,8 @@ Cookie::replace([
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->replace([
'foo' => 'bar',
'bar' => 'foo'
Expand All @@ -401,6 +409,8 @@ Cookie::replace([
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->get('foo'); // null if the cookie does not exist
```

Expand All @@ -415,6 +425,8 @@ Cookie::get('foo'); // null if the cookie does not exist
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->get('foo', false); // false if cookie does not exist
```

Expand All @@ -429,6 +441,8 @@ Cookie::get('foo', false); // false if cookie does not exist
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->all();
```

Expand All @@ -443,6 +457,8 @@ Cookie::all();
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->has('foo');
```

Expand All @@ -457,6 +473,8 @@ Cookie::has('foo');
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->pull('foo'); // null if attribute does not exist
```

Expand All @@ -471,6 +489,8 @@ Cookie::pull('foo'); // null if attribute does not exist
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->pull('foo', false); // false if attribute does not exist
```

Expand All @@ -485,6 +505,8 @@ Cookie::pull('foo', false); // false if attribute does not exist
```php
use Josantonius\Cookie\Cookie;

$cookie = new Cookie();

$cookie->remove('foo');
```

Expand Down

0 comments on commit 278c002

Please sign in to comment.