Method to get plugin params

@param   string  $name    Plugin name
@param   string  $folder  Plugin folder
@return  object
165049
public static function getParams($name, $folder)
	{
		$database = \App::get('db');

		// load the params from databse
		$sql = "SELECT params FROM `#__extensions` WHERE folder=" . $database->quote($folder) . " AND element=" . $database->quote($name) . " AND enabled=1";
		$database->setQuery($sql);
		$result = $database->loadResult();

		// params object
		$params = new Registry($result);
		return $params;
	}
831543
public function getParametersWithKey($name)
    {
        $parameters = array();

        /** @var Parameter $parameter */
        foreach ($this->parameters as $parameter) {
            if ($parameter->getKey() == $name) {
                $parameters[] = $parameter;
            }
        }

        return $parameters;
    }
549517
public static function getCustomParams($oid=null, $folder=null, $element=null)
	{
		$result = self::oneByPlugin($oid, $folder, $element);

		return new Registry($result->get('params'));
	}
695527
protected function getParam($name)
    {
        if (!isset($this->params[$name])) {
            throw new \InvalidArgumentException("Param is not valid: ".$name);
        }

        return $this->params[$name];
    }
328252
public function allocate($name, $folder = null)
    {
        return new Upload($this, isset($_FILES[$name])?$_FILES[$name]:array(), $folder);
    }
466185
public function getRootItemByName($name, $request)
    {
        $menus = $this->loadRoots($request);

        if (!isset($menus[$name])) {
            return null;
        }

        return $this->menuItemEntity->find($menus[$name][0]);
    }
314885
public function getParameterDefinition($name)
    {
        if ($this->hasParametersDefinitions()) {
            foreach ($this->getParametersDefinitions() as $parameterDefinition) {
                if ($parameterDefinition->name === $name) {
                    return $parameterDefinition;
                }
            }
        }
        return null;
    }
958939
public function findByName($name) {
		foreach ($this->parameters as $param) {
			if ($param->getName() == $name) {
				return $param;
			}
		}
	}
323753
public function param($name)
    {
        $params = $this->params();
        if (isset($params[$name])) {
            return $params[$name];
        } else {
            return null;
        }
    }
466901
protected function getParameter($name)
	{
		$merged = self::arrayMergeRecursive($this->_mergedDefaults, $this->_parameters);

		if ( array_key_exists($name, $merged) ) {
			return $merged[$name];
		}

		throw new \InvalidArgumentException('Unable to get unknown parameter "' . $name . '"');
	}
1360506
public function getParam($name, $default = null)
    {
        if (\is_array($this->params)) {
            // Check in params that are arrays or implement array access
            return $this->params[$name] ?? $default;
        } elseif (\is_object($this->params)) {
            // Check in normal objects
            return $this->params->{$name} ?? $default;
        } else {
            // Wrong type, return default value
            return $default;
        }
    }
1171050
public function getByName($name) {
		$param = $this->findByName($name);
		if (empty($param)) {
			$param = new Parameter();
			$param->setName($name);
			$this->parameters->add($param);
		}

		return $param;
	}
824300
public function get($name)
    {
        if (!$this->has($name)) {
            throw new MissingPluginException(['plugin' => $name]);
        }

        return $this->plugins[$name];
    }
537189
public function param($name = '')
    {
        switch ($this->method) {
            case 'POST':
                $data = $this->post();
                break;
            case 'GET':
                $data = $this->get();
                break;
        }

        if (empty($name)) {
            return $data;
        } else {
            return isset($data[$name]) ? $data[$name] : null;
        }
    }
898953
public function getOptionsPlugin($name = '') {
		if ($name) {
			return isset($this->options['plugin'][$name])? $this->options['plugin'][$name] : array();
		} else {
			return $this->options['plugin'];
		}
	}
864256
public function transform($folder, array $params = array())
    {
        if (!$folder instanceof FolderInterface) {
            throw new TransformerParameterTypeException();
        }
        $facade = $this->newFacade();
        $facade->folderId = $folder->getId();
        $facade->name = $this->multiLanguageChoiceManager->choose($folder->getNames());
        $facade->createdAt = $folder->getCreatedAt();
        $facade->updatedAt = $folder->getUpdatedAt();
        if ($folder->getParent() instanceof FolderInterface) {
            $facade->parentId = $folder->getParent()->getId();
        } else {
            $facade->parentId = FolderInterface::ROOT_PARENT_ID;
        }
        $facade->siteId = $folder->getSiteId();

        return $facade;
    }
806879
public function getParam($name, $default = null)
    {
        $params = $this->_context->params;
        return isset($params[$name]) ? $params[$name] : $default;
    }