1. Go to this page and download the library: Download cakesuit/option library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Load the Model if necessary
$this->loadModel('Options');
// Fetch all data marked autoload
$options = $this->Options->find('autoload');
echo $options->site_name; // = 'My Blog'
echo $options->site_description; // = 'Use CakeSuit/Option for advance settings'
echo $options->analytics_ua; // = null (this value does not exist)
// Load the Model if necessary
$this->loadModel('Cakesuit/Option.Options');
$options = $this->Options->find('keys', [
'keys' => ['analytics_ua', 'site_description']
]);
echo $options->site_name; // = null
echo $options->site_description; // = 'Use CakeSuit/Option for advance settings'
echo $options->analytics_ua; // = 'UA-XXXXXX'
// Load the Model if necessary
$this->loadModel('Cakesuit/Option.Options');
$options = $this->Options->find('keys', [
'keys' => ['no_exists_value']
]);
$options->isEmpty(); // = true
// Load the Model if necessary
$this->loadModel('Cakesuit/Option.Options');
$options = $this->Options->find('autoload');
echo $options->count(); // = 2
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.