write() 공개 메소드

Write a value to the cookie store.
public write ( string $key, mixed $value = null, array $options = [] ) : Closure
$key string Key of the item to be stored.
$value mixed The value to be stored.
$options array Options array.
리턴 Closure Function returning boolean `true` on successful write, `false` otherwise.
 public function testBadWrite()
 {
     $cookie = new Cookie(array('expire' => null));
     $this->assertNull($cookie->write('bad', 'val'));
 }