Cookies
class Cookies implements Countable, IteratorAggregate
Cookies.
Properties
| protected array | $defaults | Default options. | |
| protected array | $cookies | Cookies. | |
| protected Signer | $signer | Signer instance. | 
Methods
                    int
                
                
                    count()
        
                                            
                
            Returns the numner of cookies.
                    getIterator()
        
                                            
                
            Retruns an array iterator object.
                    setOptions(array $defaults)
        
                                            
                
            Set default options values.
                    add(string $name, string $value, int $ttl = 0, array $options = [], bool $raw = false)
        
                                            
                
            Adds a unsigned cookie.
                    addSigned(string $name, string $value, int $ttl = 0, array $options = [])
        
                                            
                
            Adds a signed cookie.
                    bool
                
                
                    has(string $name)
        
                                            
                
            Returns TRUE if the cookie exists and FALSE if not.
                    array
                
                
                    all()
        
                                            
                
            Returns all the cookies.
Details
        at         line 58
                            
    __construct(Signer|null $signer = null)
        
    
    Constructor.
        at         line 68
                            int
    count()
        
    
    Returns the numner of cookies.
        at         line 78
                            ArrayIterator
    getIterator()
        
    
    Retruns an array iterator object.
        at         line 89
                            Cookies
    setOptions(array $defaults)
        
    
    Set default options values.
        at         line 106
                            Cookies
    add(string $name, string $value, int $ttl = 0, array $options = [], bool $raw = false)
        
    
    Adds a unsigned cookie.
        at         line 130
                            Cookies
    addSigned(string $name, string $value, int $ttl = 0, array $options = [])
        
    
    Adds a signed cookie.
        at         line 146
                            bool
    has(string $name)
        
    
    Returns TRUE if the cookie exists and FALSE if not.
        at         line 157
                            Cookies
    remove(string $name)
        
    
    Removes a cookie.
        at         line 171
                            Cookies
    delete(string $name, array $options = [])
        
    
    Deletes a cookie.
        at         line 183
                            Cookies
    clear()
        
    
    Clears all the cookies.
        at         line 195
                            array
    all()
        
    
    Returns all the cookies.