Returns a configuration parameter

@param $param
@param mixed $default
@return string
@throws \opus\payment\Exception
776783
public function getConfParam($param, $default = null)
    {
        if (isset($this->params[$param])) {
            return $this->paymentHandler->formatConfigParam($param, $this->params[$param]);
        } elseif (isset($default)) {
            return $default;
        } else {
            throw new Exception("Configuration parameter '$param' not set for adapter '" . $this->name . "'");
        }
    }
1114698
protected function _defaultInput($param)
    {
        $input = $param->formInputConfig();
        $name = $param->config('name');
        $input += [
            'type' => 'text',
            'required' => false,
            'label' => Inflector::humanize(preg_replace('/_id$/', '', $name)),
        ];
        if (!$param->visible()) {
            $input['type'] = 'hidden';
        }

        return $input;
    }
1338613
public static function getInt(
        array $params,
        string $key,
        $default = null
    ) {
        if (self::has($params, $key)) {
            return (int)$params[$key];
        }

        return $default;
    }
630393
public function get($param = null, $defaultValue = null)
    {
        // return $this->getRequest()->get($param, $defaultValue);

        if ($param === null) {
            return $_REQUEST;
        }

        return isset($_REQUEST[$param]) ? $_REQUEST[$param] : $defaultValue;
    }
58313
public function get(string $key, $default = null)
    {
        if ($this->exists($key)) {
            return $this->parameters[$key];
        }

        return $default;
    }
1145090
public static function check($param, $default = false)
    {
        $p = self::separate($param);
        //
        if ($p['first'] == 'database') {
            self::checkDatabase($p['second']);
        }
        //
        else {
            if (!in_array($p['first'], self::getFirstLevel())) {
                if (!$default) {
                    self::exception($p['first'], $p['second']);
                }

                return true;
            } elseif (!array_key_exists($p['second'], self::$params[$p['first']])) {
                if (!$default) {
                    self::exception($p['first'], $p['second']);
                }

                return true;
            }
        }
        //
        return true;
    }
490349
public function get($paramName = null, $default = null)
    {
        $result = $default;

        $params = $this->getRequestParams();

        if ($paramName === null) {
            $result = $params;
        } elseif (isset($params[$paramName])) {
            $result = $params[$paramName];
        }

        return $result;
    }
99093
protected function _parameter_default($key, $default = NULL)
	{
		if ( ! array_key_exists($key, $this->_parameters))
		{
			return $default;
		}
		return $this->_parameters[$key];
	}
230121
public function get(string $parameter, $default = null)
    {
        if (false === $this->container->hasParameter($parameter)) {
            return $default;
        }

        if (null === $value = $this->container->getParameter($parameter)) {
            return $default;
        }

        return $value;
    }
921389
public function get($key, $default = null, $params = [])
    {
        $params = array_merge($this->_defaults, $params);

        foreach ($params['objects'] as $object) {
            if ($object && ($object instanceof ViewableData) && $object->$key) {
                return $object->$key;
            }
        }

        // Grab mapping from object
        $mapping = (array)Config::inst()->get('environment', 'mapping');
        $objects = array_reverse($params['objects'], true);

        foreach ($objects as $object) {
            if ($object && method_exists($object, 'config')) {
                $mapping = array_merge($mapping, (array)$object->config()->db_to_environment_mapping);
            }
        }

        $mapping = array_merge($mapping, $params['mapping']);

        if (isset($mapping[$key])) {
            $key = $mapping[$key];
        }

        // 1. Check cache for valid key and return if found
        if ($params['fromCache'] && array_key_exists($key, $this->_cache)) {
            return $this->_cache[$key] === null ? $default : $this->_cache[$key];
        }

        $value = $default;

        // The function to check the $_ENV vars
        $findInEnvironment = function ($key) use ($params) {
            $value = null;

            if (isset($_ENV[$key])) {
                $value = $_ENV[$key];
            }

            if (getenv($key)) {
                $value = getenv($key);
            }

            if (is_callable($params['parseEnvVarFn'])) {
                $value = call_user_func_array($params['parseEnvVarFn'], [$value, $key]);
            }

            return $value;
        };

        // If key has dots, check recursively
        if (strpos($key, '.')) {
            $keyParts = explode('.', $key);

            // First part of key can denote multiple classes separated by a pipe (or)
            $namespaces = explode('|', array_shift($keyParts));

            // 2. Check \Config class for original value
            foreach ($namespaces as $namespace) {
                // Do a callback to get a value from a function sent in (this is for checking SiteConfig)
                if (isset($params['beforeConfigNamespaceCheckCallbacks'][$namespace]) && is_callable($params['beforeConfigNamespaceCheckCallbacks'][$namespace])) {
                    $value = call_user_func_array($params['beforeConfigNamespaceCheckCallbacks'][$namespace],
                        [$keyParts, $key]);

                    if ($value !== null) {
                        break;
                    }
                }

                $config = Config::inst()->forClass($namespace);

                $value = $config->get(implode('.', $keyParts), $params['on']);

                // 3. If value not found explicitly, recursively get if array
                if (!$value && count($keyParts) > 1) {
                    $configKey = array_shift($keyParts);
                    $configValue = $config->get($configKey, $params['on']);

                    if (is_array($configValue)) {
                        $value = array_get($configValue, implode('.', $keyParts));
                    } else {
                        $value = $configValue;
                    }
                }

                if ($value !== null) {
                    break;
                }
            }

            // 4. Check environment for key explicitly
            if ($value === null) {
                $value = $findInEnvironment($key);
            }

            // 5. Otherwise check for key by namespace in environment
            if ($value === null && count($namespaces) > 1) {
                foreach ($namespaces as $namespace) {
                    $value = $findInEnvironment($namespace . '.' . implode('.', $keyParts));

                    if ($value !== null) {
                        break;
                    }
                }
            }

            // 6. Otherwise check for key recursively in environment
            if ($value === null && !empty($keyParts)) {
                foreach ($namespaces as $namespace) {
                    if (($first = $findInEnvironment($namespace)) && is_array($first)) {
                        $value = array_get($first, implode('.', $keyParts));

                        if ($value !== null) {
                            break;
                        }
                    }
                }

                // 7. Otherwise, check for key as is (without namespaces, a global override to assume)
                if ($value === null) {
                    $value = $findInEnvironment(implode('.', $keyParts));
                }
            }
        } else {
            // Or else check in $_ENV vars
            $value = $findInEnvironment($key);
        }

        if ($params['doCache']) {
            $this->_cache[$key] = $value;
        }

        return $value === null ? $default : $value;
    }
1276198
protected function get($parameter, $default=null) {
		return isset($this->parameters[$parameter]) ? $this->parameters[$parameter] : $default;
	}
719482
public function getParameter($name, $default = NULL)
	{
		if (isset($this->params[$name])) {
			return $this->params[$name];

		} else {
			return $default;
		}
	}
172765
protected function getParam($param = null, $defaultValue = null)
    {
        $request = $this->getRequest();
        if ($param === null) {
            return array_merge($request->getQuery(), $request->getParams());
        }

        $value = $request->getParam($param);
        if ($value === null) {
            return $request->getQuery($param, $defaultValue);
        }

        return $value;
    }
1047618
public static function get_config_param( $id, $param ) {
		if ( ! isset( self::$config[ $id ] ) || ! isset( self::$config[ $id ][ $param ] ) ) {
			return '';
		}
		return self::$config[ $id ][ $param ];
	}
971384
private function resolveParameter($parameter, $default = null)
    {
        if (($request = $this->resolveRequest()) === null) {
            return $default;
        }

        return $request->attributes->get('_lug_'.$parameter, $default);
    }
821978
protected function getOperationConfig($name, $param = null, $default = null)
    {
        $config = isset($this->serviceConfig['operations'][$name])
            ? $this->serviceConfig['operations'][$name] : null;
        
        if ($param === null || $config === null) {
            return $config;
        } else {
            return isset($config[$param]) ? $config[$param] : $default;
        }
    }
1275882
public function getParam($param = null)
    {
        if (null === $param) {
            return $this->params;
        }

        return isset($this->params[$param]) ? $this->params[$param] : null;
    }