public function set($key, $value, $params = array()) {
        $expire = 0;
        $path = null;
        $domain = null;
        $secure = false;
        $httponly = false;

        if (isset($params['expire'])) {
            $expire = $params['expire'];
        }
        if (isset($params['path'])) {
            $path = $params['path'];
        }
        if (isset($params['domain'])) {
            $domain = $params['domain'];
        }
        if (isset($params['secure'])) {
            $secure = $params['secure'];
        }
        if (isset($params['httponly'])) {
            $httponly = $params['httponly'];
        }

        setcookie($key, serialize($value), $expire, $path, $domain, $secure, $httponly);
    }
public function set($key, $value, $params = array()) {
        $expire = 0;
        $path = null;
        $domain = null;
        $secure = false;
        $httponly = false;

        if (isset($params['expire'])) {
            $expire = $params['expire'];
        }
        if (isset($params['path'])) {
            $path = $params['path'];
        }
        if (isset($params['domain'])) {
            $domain = $params['domain'];
        }
        if (isset($params['secure'])) {
            $secure = $params['secure'];
        }
        if (isset($params['httponly'])) {
            $httponly = $params['httponly'];
        }

        setcookie($key, serialize($value), $expire, $path, $domain, $secure, $httponly);
    }
public function set ( $ key , $ value , $ params = array ( ) ) { $ expire = 0 ; $ path = null ; $ domain = null ; $ secure = false ; $ httponly = false ; if ( isset ( $ params [ 'expire' ] ) ) { $ expire = $ params [ 'expire' ] ; } if ( isset ( $ params [ 'path' ] ) ) { $ path = $ params [ 'path' ] ; } if ( isset ( $ params [ 'domain' ] ) ) { $ domain = $ params [ 'domain' ] ; } if ( isset ( $ params [ 'secure' ] ) ) { $ secure = $ params [ 'secure' ] ; } if ( isset ( $ params [ 'httponly' ] ) ) { $ httponly = $ params [ 'httponly' ] ; } setcookie ( $ key , serialize ( $ value ) , $ expire , $ path , $ domain , $ secure , $ httponly ) ; }
Set variable to storage

@var string $key Key
@var mixed $value Value
@var array $params Parameters (expire, path, domain, secure, httponly)

@see SessionInterface::set
Set variable to storage