-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
34 lines (30 loc) · 997 Bytes
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
declare(strict_types=1);
/**
* Parsing the `setting.json` and store into $filterOptions.
*
* @var array $filterOptions
*/
$filterOptions = [];
if (file_exists("setting.json")) {
$settingJson = json_decode(file_get_contents("setting.json"));
$filterOptions = [
"types" => $settingJson->types,
"languages" => $settingJson->languages,
"max_size" => $settingJson->max_size
];
}
/**
* Array argument passed to each callback.
* Will be invoked when exact even triggered.
*
* @var array $callbacks = [
* "onInitialize" => function(["username" => string, "filter_options" => array]) {},
* "onFetched" => function(["response" => mixed]) {},
* "onExecuted" => function(["mode" => int]) {},
* "onFileDownloaded" => function(["file" => GistFile, "count" => int]) {},
* "onDirectoryCreated" => function([]) {},
* "onFileWritten" => function(["file" => GistFile, "file_directory" => string]) {}
* ]
*/
$callbacks = [];