Repository navigation
Options
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Helpers\Options manages application options stored in database table options.
It is a singleton with typed casting and optional password encryption.
Returns one option value.
Updates one option value in DB and in-memory cache.
Password-type options can be encrypted/decrypted using OPTIONS_CRYPT_KEY from .env.
Helper:
isCryptAvailable(): bool
use Pair\Helpers\Options;
$siteName = Options::get('site_name');
if (Options::exists('smtp_password')) {
Options::set('smtp_password', 'new-secret');
}
$all = Options::getInstance()->getAll();- Missing option names throw
PairExceptionon set. - Option values are cast according to their configured type (
int,bool,password, ...).
See also: Database, Configuration-file, Mailer.
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4