Ensure each consecutive key of the input array is set (filling with nulls)

@param array<mixed|null> $input
@param mixed             $default Filling value.

@return array<mixed|null>
544007
protected function fillArrayInput(array $input, $default = 0)
    {
        if (empty($input)) {
            return [];
        }

        $res = array_fill($default, max(array_keys($input)), null);

        foreach ($input as $index => $value) {
            $res[$index] = $value;
        }

        return $res;
    }
474767
public function with_input( array $input = null ) {
		$this->get_session()->flash_input(
			$this->clean_input( ! is_null( $input ) ? $input : $this->get_request()->input() )
		);

		return $this;
	}
699367
public function get($key, $default = null)
    {
        $array = $this->objects;

        if (isset($array[$key])) {
            return $array[$key];
        }
        foreach (explode('\\', $key) as $segment) {
            if (!is_array($array) || !array_key_exists($segment, $array)) {
                return $default;
            }
            $array = $array[$segment];
        }
        return $array;
    }
480570
public function getArray($key, array $default = array())
    {
        $value = $this->get($key, null);

        return null !== $value ? (array) $value : (array) $default;
    }
79675
protected function input($key = null, $defaultValue = null)
    {
        return is_null($key) ? $_REQUEST : fnGet($_REQUEST, $key, $defaultValue);
    }
180596
public function returnOrSet($key, $default=NULL){
        if($this->offsetExists($key)){
            return $this->offsetGet($key);
        }
        $this->offsetSet($key, $default);
        return $default;
    }
785658
public function config($key, $default = null)
    {
        // if an array is passed as the key, we will assume you want to set an array of values
        if (is_array($key)) {
            return $this->config = array_merge($this->config, $key);
        }

        return array_key_exists($key, $this->config)
                ? $this->config[$key]
                : $default;
    }
982235
function setdefault($key, $default=null) {
		return $this->offsetExists($key) ? $this[$key] : $this[$key] = $default;
	}
1368152
public function id($key = null, $default = null)
    {
        $element = $this->getHandler()->getKeyMapElement($key, $default);
        return is_array($element) && array_key_exists('id', $element) ? (int) $element['id'] : $default;
    }
1102350
public function input(string $key = null, $default = null)
    {
        $inputs = $this->getQueryParams() + $this->getParsedBody();
        if (is_null($key)) {
            return $inputs;
        }
        return $inputs[$key] ?? $default;
    }
1215627
private function convert($input, $pre = null){
        if (is_array($input)) {
            $output = array();
            foreach ($input as $key => $value) {
                $index = is_null($pre) ? $key : "{$pre}[{$key}]";
                if (is_array($value)) {
                    $output = array_merge($output, $this->convert($value, $index));
                } else {
                    $output[$index] = $value;
                }
            }
            return $output;
        }
        return $input;
    }
785148
public function getMultiple($keys, $default = null)
    {
        $cache = [];
        foreach ($keys as $key) {
            $cache[$key] = $this->get($key, $default);
        }

        return $cache;
    }
154501
public function input($key = null, $default = null)
    {
        return data_get(
            $this->getInputSource()->all() + $this->query->all(), $key, $default
        );
    }
585778
public function input($key, $default = false)
    {
        return $this->getRequestInputByType()->has($key) ?
            $this->getRequestInputByType()->get($key) : $default;
    }
724222
public function value($key, $default = null)
    {
        return array_key_exists($key, $this->values)
            ? $this->values[$key]
            : $default;
    }
1044462
public function get($key, $default = null)
	{
        $value = $this->settings;
        $value = set_nested_array_value($value, $key);

        if ( ! is_null($value))
        {
            return $value;
        }

        return $default;
	}
707458
public function input($key = null, $default = null)
    {
        if ($key !== null) {
            return isset($this->input[$key]) ? $this->input[$key] : $default;
        }

        return $this->input;
    }