lambdatt-php / settings
A SplitPHP Framework plugin for create a general purpose settings control
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:splitphp-module
README
A SplitPHP Framework plugin for create a general purpose settings control.
Installation
Install via Composer:
composer require lambdatt-php/settings
Run the Migrations:
php console migrations:apply --module=settings
PS: this can only be installed on a SplitPHP Framework project. For more information refer to: https://github.com/splitphp/core
Usage:
- Set a variable and its value:
$this->getService('settings/settings')->change($context, $fieldname, $value);
- Retrieve a variable and its value:
$this->getService('settings/settings')->get($context, $fieldname);
- Retrieve an object of a context containing all its variables and values:
$this->getService('settings/settings')->contextObject($context);