Cookie_Backend
interface Cookie_Backend (View source)
The Cookie_Backend interface for use with Cookie::$inst.
See Cookie_DefaultBackend and Cookie
Methods
                    public                                                                            
                
                    __construct(array $cookies = [])
        
                                            
                
            When creating the backend we want to store the existing cookies in our "existing" array. This allows us to distinguish between cookies we received or we set ourselves (and didn't get from the browser)
                    public                                                                            
                
                    set(string $name, string $value, float $expiry = 90, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)
        
                                            
                
            Set a cookie
                    public                                                                            
                
                    forceExpiry(string $name, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)
        
                                            
                
            Force the expiry of a cookie by name
Details
        
                            
    __construct(array $cookies = [])
        
    
    When creating the backend we want to store the existing cookies in our "existing" array. This allows us to distinguish between cookies we received or we set ourselves (and didn't get from the browser)
        
                            
    set(string $name, string $value, float $expiry = 90, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)
        
    
    Set a cookie
        
                            string|null
    get(string $name, bool $includeUnsent = true)
        
    
    Get the cookie value by name
        
                            array
    getAll(bool $includeUnsent = true)
        
    
    Get all the cookies
        
                            
    forceExpiry(string $name, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)
        
    
    Force the expiry of a cookie by name