/** * */ public function __construct() { $this->values = []; $this->values = array_merge($this->values, getAppEnv()); if (function_exists('getAppKeys')) { $this->values = array_merge($this->values, getAppKeys()); } }
public function __construct() { require_once __DIR__ . "/../../../clavis.php"; require_once __DIR__ . "/../../autogen/appEnv.php"; $this->values = []; $this->values = array_merge($this->values, getAppEnv()); $this->values = array_merge($this->values, getAppKeys()); }
<?php require_once __DIR__ . '/../../clavis.php'; if (php_sapi_name() != "cli") { echo "not allowed"; exit(0); } if ($argc != 2) { echo "Usage info.php SOME_VARIABLE_NAME\n"; exit(0); } $variableRequired = $argv[1]; $allowedVariables = array('github.access_token'); if (in_array($variableRequired, $allowedVariables) == false) { echo "Unknown variable: {$variableRequired}\n"; exit(-1); } $keys = getAppKeys(); if (array_key_exists($variableRequired, $keys) == false) { echo "Mysteriously the variable isn't set in the keys."; exit(-2); } exit("" . $keys[$variableRequired] . "");