public function setCookie($name, $value, $expires = null, $path = null, $domain = null, $secure = false, $httponly = false) {

        if ($expires !== null) {
            setcookie($name, $value, time() + $expires, $path, $domain, $secure, $httponly);
        } else {
            setcookie($name, $value, 0, $path, $domain, $secure, $httponly);
        }
    }
public function setCookie($name, $value, $expires = null, $path = null, $domain = null, $secure = false, $httponly = false) {

        if ($expires !== null) {
            setcookie($name, $value, time() + $expires, $path, $domain, $secure, $httponly);
        } else {
            setcookie($name, $value, 0, $path, $domain, $secure, $httponly);
        }
    }
public function setCookie ( $ name , $ value , $ expires = null , $ path = null , $ domain = null , $ secure = false , $ httponly = false ) { if ( $ expires !== null ) { setcookie ( $ name , $ value , time ( ) + $ expires , $ path , $ domain , $ secure , $ httponly ) ; } else { setcookie ( $ name , $ value , 0 , $ path , $ domain , $ secure , $ httponly ) ; } }
Sets or updates a Cookie
@param string $name Cookie name to be setted
@param string $value Content string of the Cookie.
@param int $expires Timestamp of Cookie expiration time.
@param string $path Path to apply the Cookie.
@param string $domain Domain of the Cookie.
@param boolean $secure True if the cookie is marked as secure.
@param boolean $httponly True if the cookie is applied only in HTTP mode.
Sets or updates a Cookie