Explodes parameter if possible and returns array [column, relation]
Empty array is returned if explode could not run eg: separator was not found.

@param $parameter

@return array

@throws \Kyslik\ColumnSortable\Exceptions\ColumnSortableException
972536
public static function explodeSortParameter($parameter)
    {
        $separator = config('columnsortable.uri_relation_column_separator', '.');

        if (str_contains($parameter, $separator)) {
            $oneToOneSort = explode($separator, $parameter);
            if (count($oneToOneSort) !== 2) {
                throw new ColumnSortableException();
            }

            return $oneToOneSort;
        }

        return [];
    }
1280448
private function getArgumentByName(\ReflectionParameter $parameter, $parameters)
    {
        foreach ($parameters as $name => $item) {
            $paramName = $parameter->getName();
            if ($name === $paramName) {
                return $item;
            }
        }

        return null;
    }
891486
public function has($parameter) {

        return is_null($this->getFromParts(self::splitParts($parameter))) ? false : true;

    }
705016
public function getParameter($parameter)
    {
        if ($this->hasParameter($parameter)) {
            return ArrayUtils::get($this->parameters, $parameter);
        }

        if (array_key_exists($parameter, $this->mapping) && ArrayUtils::has($this->parameters, $this->mapping[$parameter])) {
            return ArrayUtils::get($this->parameters, $this->mapping[$parameter]);
        }

        //otherwise let's go default
        $defaults = [];
        foreach ($this->defaultConfigs as $default) {
            $defaults = array_merge($default, $defaults);
        }

        if (array_key_exists($parameter, $defaults)) {
            return ArrayUtils::get($defaults, $parameter);
        }

        if (array_key_exists($parameter, $this->mapping) && ArrayUtils::has($defaults, $this->mapping[$parameter])) {
            return ArrayUtils::get($defaults, $this->mapping[$parameter]);
        }

        return null;
    }
487489
final public function getQuery(array $parameters = [])
    {
        $parameters = $this->getOptionsResolver()->resolve($parameters);
        $query = $this->buildQuery();

        $sortDefinitions = $parameters['sort'];
        if (!is_array($sortDefinitions)) {
            $sortDefinitions = [$sortDefinitions];
        }

        $query->query = $this->getQueryCriterion($parameters);
        $query->filter = $this->resolveFilterCriteria($parameters);
        $query->facetBuilders = $this->getFacetBuilders($parameters);
        $query->sortClauses = $this->getSortClauses($sortDefinitions);
        $query->limit = $parameters['limit'];
        $query->offset = $parameters['offset'];

        return $query;
    }
617033
public function get($parameter=null) {

        if ( is_null($parameter) ) return $this->parameters;

        return array_key_exists($parameter, $this->parameters) ?
            $this->parameters[$parameter] : null;

        // substitution by backreference is cool but hard compute for a large set of values :(
        //
        // if ( is_scalar($value) && preg_match_all('/%(.+?)%/', $value, $matches, PREG_SET_ORDER) ) {
        //
        //     $substitutions = array();
        //
        //     foreach ( $matches as $match ) {
        //
        //         $backreference = $match[1];
        //
        //         if ( $backreference != $property && !isset($substitutions['/%'.$backreference.'%/']) ) {
        //
        //             $substitutions['/%'.$backreference.'%/'] = $this->get($backreference);
        //
        //         }
        //
        //     }
        //
        //     $value = preg_replace(array_keys($substitutions), array_values($substitutions), $value);
        //
        // }

    }
47269
private function parseParameter($parameter)
    {
        if (!is_array($parameter)) {
            return print_r($parameter, true);
        }

        return $this->parseArrayParameter($parameter);
    }
878145
protected function parameterAllowsGuests($parameter)
    {
        return ($parameter->getClass() && $parameter->allowsNull()) ||
               ($parameter->isDefaultValueAvailable() && is_null($parameter->getDefaultValue()));
    }
221736
protected function parseArgument($parameter)
    {
        if ($this->commandNameEnabled && !$this->commandName) {
            $this->commandName = $parameter;
        } else {
            $this->arguments[] = $parameter;
        }
        return $this;
    }
1073094
protected function compileParameters(array $parameters)
    {
        return collect($parameters)->map(function ($value, $key) {
            if (is_array($value)) {
                $value = collect($value)->map(function ($value) {
                    return ProcessUtils::escapeArgument($value);
                })->implode(' ');
            } elseif (! is_numeric($value) && ! preg_match('/^(-.$|--.*)/i', $value)) {
                $value = ProcessUtils::escapeArgument($value);
            }

            return is_numeric($key) ? $value : "{$key}={$value}";
        })->implode(' ');
    }
800589
public static function getType($parameter)
    {
        if (is_bool($parameter)) {
            return \PDO::PARAM_BOOL;
        } elseif ($parameter === null) {
            return \PDO::PARAM_NULL;
        } elseif (is_int($parameter)) {
            return \PDO::PARAM_INT;
        } else {
            return \PDO::PARAM_STR;
        }
    }
685589
protected function parseNamedParameters($parameters)
    {
        return array_reduce($parameters, function ($result, $item) {
            [$key, $value] = array_pad(explode('=', $item, 2), 2, null);

            $result[$key] = $value;

            return $result;
        });
    }
767130
public function getParameter($parameter)
    {
        return $this->container->hasParameter($parameter) ? $this->container->getParameter($parameter) : null;
    }
1023385
private function parameters($parameters): array
    {
        $values = (!is_array($parameters)) ? [$parameters] : $parameters;

        $strings = [];

        foreach ($values as $value) {
            $strings[] = self::make($value, $this->encoding);
        }

        return $strings;
    }
576748
public function getParameters(array $parameters = []): array
    {
        foreach (array_merge($parameters, $this->getParameterArray()) as $parameter) {
            if (isset($this->$parameter)) {
                $parameters[$parameter] = $this->$parameter;
            }
        }
        foreach ($this->extraParameters as $parameter => $function) {
            $parameters[$parameter] = $this->$function();
        }
        return $this->filterArray($parameters);
    }
822919
public static function _GPmerged($parameter) {
		$postParameter = (isset($_POST[$parameter]) && is_array($_POST[$parameter])) ? $_POST[$parameter] : array();
		$getParameter = (isset($_GET[$parameter]) && is_array($_GET[$parameter])) ? $_GET[$parameter] : array();

		$mergedParameters = self::array_merge_recursive_overrule($getParameter, $postParameter);
		self::stripSlashesOnArray($mergedParameters);

		return $mergedParameters;
	}
609440
public function find($parameters): array
    {
        if ($parameters instanceof Query) {
            $parameters = $parameters->compileParameters();
        }

        $parameters = $this->formatParameters($parameters, self::ENPOINT_COLLECTION);
        $url = $this->urlCollection.'/';

        $results = $this->client->loadResource($url, $parameters['parameters']);

        $models = [];
        foreach ($results as $result) {
            $models[] = new Model($this->name, $result);
        }

        return $models;
    }