PHP code example of godbout / alfred-workflow-config

1. Go to this page and download the library: Download godbout/alfred-workflow-config 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/ */

    

godbout / alfred-workflow-config example snippets




use Godbout\Alfred\Workflow\Config;

Config::write('language', 'english');

Config::write('workflow.user.name', 'Guill');

$language = Config::read('language');

$userName = Config::read('workflow.user.name');

Config::ifEmptyStartWith(['version' => 1.0, 'enabled' => true]);

protected function tearDown(): void
{
    parent::tearDown();

    Config::destroy();
}