1. Go to this page and download the library: Download antfroger/progressive 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/ */
antfroger / progressive example snippets
// From a file
$config = \Symfony\Component\Yaml\Yaml::parseFile('/your-own-config-file.yaml');
// Content of /your-own-config-file.yaml
// features:
// dark-theme: true
// call-center: false
// homepage-v2:
// enabled: true
// Or from a PHP array
$config = [
'features' => [
'dark-theme' => true,
'call-center' => false,
'homepage-v2' => [
'enabled' => true
],
]
];
$progressive = new Progressive($config);
$progressive->isEnabled('dark-theme'); // true
$progressive->isEnabled('call-center'); // false
$progressive->isEnabled('homepage-v2'); // true