public static function set($name, $value, $days = 30, $basepath = '/')
    {
        // Gems uses the empty string when the base path is '/'
        if (! $basepath) {
            $basepath = '/';
        }

        if (\Zend_Session::$_unitTestEnabled) {
            return true;
        }

        // Set the cookie for 30 days
        return setcookie($name, $value, time() + ($days * 86400), $basepath, '', (APPLICATION_ENV == 'production'), true);
    }
public static function set($name, $value, $days = 30, $basepath = '/')
    {
        // Gems uses the empty string when the base path is '/'
        if (! $basepath) {
            $basepath = '/';
        }

        if (\Zend_Session::$_unitTestEnabled) {
            return true;
        }

        // Set the cookie for 30 days
        return setcookie($name, $value, time() + ($days * 86400), $basepath, '', (APPLICATION_ENV == 'production'), true);
    }
public static function set ( $ name , $ value , $ days = 30 , $ basepath = '/' ) { // Gems uses the empty string when the base path is '/' if ( ! $ basepath ) { $ basepath = '/' ; } if ( \ Zend_Session :: $ _unitTestEnabled ) { return true ; } // Set the cookie for 30 days return setcookie ( $ name , $ value , time ( ) + ( $ days * 86400 ) , $ basepath , '' , ( APPLICATION_ENV == 'production' ) , true ) ; }
Store this cookie in a generic save method that works for both sub-directory
installations and own url installations.

@param string $name Name of the cookie
@param mixed $value Value to set
@param int $days Number of days to keep this cookie
@param string $basepath The folder of the domain, if any.
@return boolean True if the cookie was stored.
Store this cookie in a generic save method that works for both sub - directory installations and own url installations .