wpdesk / wp-persistence
There is no license information available for the latest version (3.0.2) of this package.
3.0.2
2022-04-09 12:21 UTC
Requires
- php: >=7.0
- psr/container: ~1.0.0
Requires (Dev)
- phpunit/phpunit: ^6
- squizlabs/php_codesniffer: ^3.0.2
- wimg/php-compatibility: ^8
- wp-coding-standards/wpcs: ^0.14.1
- wpdesk/wp-wpdesk-composer: ^2.6
This package is auto-updated.
Last update: 2024-12-09 17:52:31 UTC
README
WordPress Library to facilitate access to various persistence possibilities
Requirements
PHP 7.0 or later.
Composer
You can install the bindings via Composer. Run the following command:
composer require wpdesk/wp-persistence
To use the bindings, use Composer's autoload:
require_once 'vendor/autoload.php';
Compatiblity between plugins
To ensure that always the latest and valid version of composer libraries are loaded in WP env you should use a solution that ensure support between plugins and at least decreases the change that something would break. At the moment we recommend using wpdesk/wp-autoloader.
Manual instalation
If you do not wish to use Composer and wpdesk/wp-autoloader, you probably should stop using any existing library as it breaks compatibility between plugins.
When has() is true and when get() will throw an exception
Value | Get | Has |
---|---|---|
'test' | 'test' | true |
[] | [] | true |
'' | '' | true |
99 | '99' or 99 | true |
0 | '0' or 0 | true |
true | true or '1' | true |
false | false or '' | true |
not set | exception | false |
null | exception | false |