Download the PHP package wp-forge/wp-cookie-manager without Composer

On this page you can find all versions of the php package wp-forge/wp-cookie-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-cookie-manager

WordPress Cookie Manager

A WordPress library to simplify cookie management.

What It Does

Abstracts away all the PHP cookie management and WordPress cookie constants so you can just get and set cookies.

How to Use It

  1. Add to your project via Composer:

  2. Make sure you have added the Composer autoloader to your project:

  3. Start managing cookies

Using the Underlying Cookie Class

The CookieManager provides you with a global way to configure and manage working with cookies. However, if you need to work with a cookie that needs a very different configuration, you can use the Cookie class directly.

Note that using the Cookie class directly will not use the smart defaults provided by the CookieManager.

Advanced Usage

By default, the CookieManager will use smart, WordPress-specific defaults. These defaults can be overridden and the steps to do so are outlined below.

Customizable properties

Name Prefix

By default, all cookie names are prefixed with wp-. This can be changed by setting the $namePrefix property.

Name Suffix

By default, all cookie names are suffixed with a - followed by the WordPress COOKIEHASH constant. This can be changed by setting the$nameSuffix property.

Path

By default, the cookie path is set to the WordPress COOKIEPATH constant. This can be changed by setting the$path property.

Domain

By default, the cookie domain is set to the WordPress COOKIE_DOMAIN constant. If the COOKIE_DOMAIN is empty, it falls back to the $_SERVER['HTTP_HOST'] value (i.e. the current domain). This can be overwritten by setting the$domain property.

Secure

By default, the $secure property is set to the value returned by the is_ssl() WordPress function. Setting the value to true will ensure that the cookie is only sent over an HTTPS connection. Setting the value to false will ensure that the cookie is always sent, regardless of whether the connection is encrypted.

HTTP Only

By default, the $httpOnly property is set to false, which means that the cookie will be available in all contexts. Setting the value to true will ensure that the cookie is only accessible in PHP, not JavaScript. This can be useful to help prevent identify theft via XSS attacks.


All versions of wp-cookie-manager with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wp-forge/wp-cookie-manager contains the following files

Loading the files please wait ....