private function readConfigFromFile($configFilePath, $nodeName)
 {
     $config = \ncYaml::load($configFilePath)[$nodeName];
     if (empty($config)) {
         throw new ElasticSearchDaoException("Could not load configuration for '{$nodeName}' from '{$configFilePath}'");
     }
     return $config;
 }
 /**
  * Initializes this ncDatabaseManager object
  */
 private function __construct()
 {
     $configDirs = explode(PATH_SEPARATOR, NC_DB_CONFIG);
     $config = array();
     foreach ($configDirs as $configDir) {
         $configFile = $configDir . '/nc_databases.yml';
         $config = array_merge($config, ncYaml::load($configFile));
     }
     if (!$config || count($config) == 0) {
         throw new ncDatabaseException('Database configuration not found: ' . NC_DB_CONFIG);
     }
     foreach ($config as $dbName => $dbParams) {
         $factoryName = $dbParams['factory'] . 'Factory';
         $factory = new $factoryName();
         $params = $dbParams['param'];
         $database = $factory->createDatabase($params);
         $database->initialize($params);
         $this->databases[$dbName] = $database;
     }
 }
 public function __construct($loggingConfigFilePath, $nLoggerAppsDao)
 {
     $this->loggingConfig = \ncYaml::load($loggingConfigFilePath);
     $this->nLoggerAppsDao = $nLoggerAppsDao;
 }
 public function __construct($slaConfigFilePath)
 {
     $this->slaConfig = \ncYaml::load($slaConfigFilePath);
 }
<?php

namespace NewMonk\web;

require_once __DIR__ . '/../config/config.php';
use NewMonk\lib\boomerang\logger\Logger;
header('HTTP/1.0 204 No Content');
header('Content-Type: text/javascript');
$boomData = json_decode($_REQUEST['data'], true);
$loggingConfig = \ncYaml::load(__DIR__ . '/../config/logging.yml');
$boomWhitelistedAppIds = $loggingConfig['boomerang'];
if (in_array($boomData['appId'], $boomWhitelistedAppIds['appIds'])) {
    $deviceDetector = \DeviceDetectorFactory::getInstance()->getDeviceDetector($deviceDetetorServerPath, ['browserDetails', 'osDetails', 'type']);
    $boomLogger = new Logger($deviceDetector);
    if ($boomLogger->logBoomr($boomData)) {
        if (!$boomData['t_done']) {
            $boomData['t_done'] = 0;
        }
    }
}
<?php

require_once __DIR__ . '/../lib/authentication/Authenticator.php';
require_once __DIR__ . '/../config/config.php';
$response = \ncYaml::load($boomSlaConfigFilePath);
header("Content-Type: text/javascript");
echo $_REQUEST['callback'] . '(' . json_encode($response, true) . ');';