Load the profile's config.

@return array
425122
public function getProfileConfig($key)
	{
		// If no profile setted load the config.php
		if (empty($this->_profile)) {
			return $this->_configs->get('bbcoder::profile.default.'.$key);
		}

		// Check if the profile overwrites the default config.
		if ($this->_configs->has('bbcoder::profile.'.$this->_profile.'.'.$key)) {
			return $this->_configs->get('bbcoder::profile.'.$this->_profile.'.'.$key);
		}

		return $this->_configs->get('bbcoder::profile.default.'.$key);
	}
464212
private function loadConfigFromCache()
    {
        /** @var \Core\Services\Contracts\Config $config */
        $config = DI::getInstance()->get('config');

        /** @noinspection PhpIncludeInspection */
        $config->set(null, require $this->cachedFile);

        return $config;
    }
228944
public function getProfile()
    {
        if (!$this->hasProfile()) {
            return null;
        }
        $profileClass = $this->profileClass;
        $profileModel = $profileClass::buildNoInitModel();
        return $this->hasOne($profileClass,
                [$profileModel->createdByAttribute => $this->guidAttribute])->inverseOf('user');
    }
272329
protected function getSettingsConfig(): array
    {
        if (!$this->cache instanceof Cache) {
            $this->items = $this->model->getSettings();
        } else {
            $cacheItems = $this->cache->get($this->cacheKey);
            if (!empty($cacheItems)) {
                $this->items = $cacheItems;
            } else {
                $this->items = $this->model->getSettings();
                $this->cache->set($this->cacheKey, $this->items);
            }
        }

        return $this->items;
    }
357710
def load_config_file(self, path, profile=None):
        """"""
        config_cls = self.get_config_reader()
        return config_cls.load_config(self, path, profile=profile)
1214840
protected function loadSettings() {
		$folder = realpath(__DIR__);
		$segments = explode('/', $folder);
		$file = NULL;
		while (NULL === $file && 0 < count($segments) && ($segment = array_pop($segments))) {
			$base = '/' . implode('/', $segments) . '/' . $segment . '/';
			$expectedFile = $base . $this->settingsFile;
			$expectedFile = FALSE === file_exists($expectedFile) ? $base . 'Settings.yml' : $expectedFile;
			$file = TRUE === file_exists($expectedFile) ? $expectedFile : NULL;
		}
		return (array) (TRUE === file_exists($file) ? Yaml::parse(file_get_contents($file)) : array());
	}
667262
protected function getProfileConfig()
    {
        $configCallable = $this->config;
        $config = $configCallable($this->getProfileConfigKey());

        if (!is_array($config)) {
            $config = [$config];
        }

        return array_filter($config);
    }
764937
private function GetProfileFields() {
      $Fields = C('ProfileExtender.Fields', array());

      if (!is_array($Fields))
         $Fields = array();

      // Data checks
      foreach ($Fields as $Name => $Field) {
         // Require an array for each field
         if (!is_array($Field) || strlen($Name) < 1) {
            unset($Fields[$Name]);
            //RemoveFromConfig('ProfileExtender.Fields.'.$Name);
         }

         // Verify field form type
         if (!isset($Field['FormType']))
            $Fields[$Name]['FormType'] = 'TextBox';
         elseif (!array_key_exists($Field['FormType'], $this->FormTypes))
            unset($this->ProfileFields[$Name]);
      }

      return $Fields;
   }
930529
public function profiles()
    {
        if (is_null($this->profileRequests)) {
            $this->profileRequests = new ProfileRequests($this->client);
        }

        return $this->profileRequests;
    }
942706
protected function findProfile()
	{
		$adapter_profile = $this->getAdapterProfile();
		$ProfileModel = $this->config['db']['profilemodel'];
		$UserModel = $this->config['db']['usermodel'];
		$user = NULL;

		//check if the provider profile already exists
		$profile_builder = call_user_func_array(
			"$ProfileModel::where",
			array('provider', $this->provider)
		);

		if ($profile = $profile_builder->where('identifier', $adapter_profile->identifier)->first())
		{
			//we found an existing user
			$user = $profile->user()->first();
		}
		elseif ($adapter_profile->email)
		{
			//it's a new profile, but it may not be a new user, so check the users by email
			$user_builder = call_user_func_array(
				"$UserModel::where",
				array('email', $adapter_profile->email)
			);

			$user = $user_builder->first();
		}

		//if we haven't found a user, we need to create a new one
		if (!$user)
		{
			$user = new $UserModel();

			//map in anything from the profile that we want in the User
			$map = $this->config['db']['profiletousermap'];

			foreach ($map as $apkey => $ukey)
			{
				$user->$ukey = $adapter_profile->$apkey;
			}

			$values = $this->config['db']['uservalues'];

			foreach ($values as $key=>$value)
			{
				if (is_callable($value))
				{
					$user->$key = $value($user, $adapter_profile);
				}
				else
				{
					$user->$key = $value;
				}
			}

			//$user->username = $adapter_profile->email;
			$user->email = $adapter_profile->email;

			if (!$user->save($this->config['db']['userrules']))
			{
				return NULL;
			}
		}

		//if we didn't find the profile, we need to create a new one
		if (!$profile)
		{
			$profile = $this->createProfileFromAdapterProfile($adapter_profile, $user);
		}
		//if we did find a profile, make sure we update any changes to the source
		else
		{
			$profile = $this->applyAdapterProfileToExistingProfile($adapter_profile, $profile);
		}

		if (!$profile->save())
		{
			return NULL;
		}

		return $profile;
	}
543605
public function profileAction()
    {
        $model = $this->getUser();
        $data = array();

        /** @var ConfiguratorFactory $configuratorFactory */
        $configuratorFactory = $this->getConfiguratorFactory($this->getClassName());
        /** @var CrudConfigurator $crudConfigurator */
        $crudConfigurator = $configuratorFactory->getConfigurator(CrudConfigurator::class);

        foreach ($crudConfigurator->getCrud()->getShowFields() as $key => $property) {
            if ($value = MethodInvoker::invokeGet($model, $property)) {
                array_push($data, array(
                    'name' => $property,
                    'value' => $value,
                ));
            }
        }

        $translator = $this->container->get('translator');
        $translationDomain = $this->container->getParameter('symfonyid.admin.translation_domain');

        return $this->render($this->container->getParameter('symfonyid.admin.themes.profile'), array(
            'data' => $data,
            'menu' => $this->container->getParameter('symfonyid.admin.menu.menu_name'),
            'page_title' => $translator->trans('page.profile.title', array(), $translationDomain),
            'page_description' => $translator->trans('page.profile.description', array(), $translationDomain),
        ));
    }
1341061
public function loadUndefinedConfigPaths()
    {
        $list       = [];
        $collection = $this->coreConfig->getCollectionByPath(SgCoreInterface::PATH_UNDEFINED . '%');
        /** @var \Magento\Framework\App\Config\Value $item */
        foreach ($collection as $item) {
            $path       = explode('/', $item->getPath());
            $key        = array_pop($path);
            $list[$key] = $item->getPath();
        }

        return $list;
    }
1238189
public function fetchConfigData()
    {
        $this->profiler->start(__METHOD__);
        $metadata = $this->metadataPool->getMetadata(CategoryInterface::class);
        $identifierField = $metadata->getIdentifierField();

        $data = $this->getResource()->fetchConfigData();
        $labels = [];

        foreach ($data as $row) {
            if (isset($labels[$row['parent_id']])) {
                $label = $labels[$row['parent_id']];
            } else {
                $label = [];
            }
            $label[] = $row['name'];
            $labels[$row[$identifierField]] = $label;
        }
        
        $fieldOptions = [];
        foreach ($labels as $id => $label) {
            $fieldOptions[] = [
                'label' => $label = implode(' > ', $label),
                'value' => $id
            ];
        }

        $data = [
            'snowMenuAutoCompleteField' => [
                'type'    => 'category',
                'options' => $fieldOptions,
                'message' => __('Category not found'),
            ],
        ];

        $this->profiler->stop(__METHOD__);

        return $data;
    }
885906
def load_profile(profile_name):
    '''
    '''
    path = os.path.join(Config.CONF_DIR, profile_name)
    if not os.path.exists(path):
        return DEFAULT_PROFILE
    with open(path) as fh:
        profile = json.load(fh)

    for key in DEFAULT_PROFILE:
        if key not in profile:
            profile[key] = DEFAULT_PROFILE[key]

    global keyring_available
    if keyring_available:
        for i in range(RETRIES):
            try:
                profile['password'] = keyring.get_password(
                        Config.DBUS_APP_NAME, profile['username'])
                break
            except (keyring.errors.InitError, dbus.exceptions.DBusException):
                logger.error(traceback.format_exc())
        else:
            keyring_available = False
    if not profile['password']:
        profile['password'] = ''
    return profile
168273
protected function _getConfig()
    {
        if ($this->config === null) {
            $configFinder = new ConfigFinder();
            $this->config = $configFinder->loadAll();
        }

        return $this->config;
    }
1095564
public function loadConfiguration()
    {
        if (!file_exists($this->path)) {
            return array();
        }
        
        if (!is_readable($this->path)) {
            throw new Exception('The file "' . $this->path . '" isn\'t readable!');
        }
        
        $content = file_get_contents($this->path);
        $settings = json_decode($content, true);

        if ($settings == false) {
            return array();
        }
        
        return $settings;
    }
945683
public function getConfigs()
    {
        $configs = [];

        foreach ($this->getConfigFiles() as $file) {
            $name = basename($file->getFilename(), '.php');

            $values = require $file->getRealPath();

            $configs[$name] = $values;
        }

        return $configs;
    }