Get the value from POST for the given $key.

@param string $key   Key name.
@param null   $value Default value that will be returned if the $key is not found.

@return string Value under the defined $key.
175032
public function get($key, $value = null)
    {
        return $this->postBag->key($key, $value, true);
    }
1267080
public function post($key = null, $value = null)
    {
        if (!is_null($this->except)) {
            $this->skip();
        }

        if (!is_null($key) && !string_has($key, '.') && is_null($value)) {
            $postValue = '';
            $key = $this->security->sanitize($key);
            $postValue = $this->security->sanitize($this->request['post'][$key]);
            $this->request['post'][$key] = $postValue;

            if (array_key_exists($key, $this->request['post'])) {
                return $this->request['post'][$key];
            }

            throw new InvalidArgumentException("Invalid key $key passed to ".__METHOD__);
        }

        /*
         | User can access post array element by passing
         | key as dot separator with index
         | ['user' => ['name' => 'foo']]
         |
         | $input->post('user.name'); // output: foo
         */
        if (!is_null($key) && string_has($key, '.') && is_null($value)) {
            $arr = ArrayAccessor::make($this->request['post']);

            return $arr->toString($this->security->sanitize($key));
        }

        $this->setPostValue($key, $value);

        if (is_null($key)) {
            $postArr = $this->security->sanitize($this->request['post']);

            return (!empty($postArr)) ? $postArr : null;
        }
    }
1166852
public static function get($key, $value = null)
    {
        if (self::check($key, !is_null($value))) {
            return self::reach($key, $value);
        }

        static::set($key, $value);

        return $value;
    }
626008
public function post($key = null, $default = null)
	{
		if ( is_null($key) )
		{
			return $this->post;
		}

		return Arr::get($this->post, $key, $default);
	}
553953
private function parseValue(string $key, $value): string
    {

        if (is_array($value)) {
            return $this->parseArray($key, $value);
        }

        return $this->parseScalar($key, $value);
    }
276456
public function query($key, $value = null)
    {
        if ($value) {
            return $this->replicate(['query' => [$key => $value]]);
        }

        return $this->replicate(['query' => $key]);
    }
858208
public function value( $value = NULL ){
		if( is_null( $value ) )
			return $this->value;
		$this->value	= $value;
	}
724222
public function value($key, $default = null)
    {
        return array_key_exists($key, $this->values)
            ? $this->values[$key]
            : $default;
    }
749750
private function fetchValueForKey($key, $value)
    {
        if (in_array($key, $this->getDates())) {
            return trim($value) === '' ? null : $value;
        }

        if (! $this->hasSetMutator($key)) {
            $value = $this->getAttribute($key);
        }

        if ($this->isJsonCastable($key) && ! is_null($value)) {
            $value = is_string($value) ? $this->getJsonCastValue($value) : $value;
        }

        return $value;
    }
537777
public function getValue(string $key, $defaultValue = null)
    {
        if ($this->offsetExists($key)) {
            return $this->offsetGet($key);
        } else {
            return $defaultValue;
        }
    }
265563
public function getPost($key, $default = false)
    {
        $value = ee()->input->get_post($key);
        if (! $value) {
            $value = $default;
        }
        
        return $value;
    }
1306530
private function getValue(string $key, $value = null)
    {
        if (! is_null($this->language)) {
            $key = $this->language.'.'.$key;
        }

        if (! is_null($this->prefix)) {
            $key = $this->prefix.'.'.$key;
        }

        $data = $this->data->getContent($key);

        // default value
        if (is_null($data)) {
            return $value;
        }

        if ($value instanceof \Closure) {
            return $value($data, $this->data);
        }

        return $data;
    }
751759
public function read(string $value, string $key = null)
    {
        // Checks if a key was given
        if (isset($key)) {

            // Any key could be use in the where clause
            $query = 'SELECT * FROM ' . $this->table . ' WHERE ' . $key . ' = ?';
        } else {
            // The id key would be use in the where clause
            $query = 'SELECT * FROM ' . $this->table . ' WHERE id = ?';
        }
        // Execute the select query, then returns the results
        return $this->database->result($query, [$value]);
    }
1209079
public function Post($Key = NULL, $Default = NULL) {
      if ($Key === NULL)
         return $this->GetRequestArguments (self::INPUT_POST);
      else
         return $this->GetValueFrom(self::INPUT_POST, $Key, $Default);
   }
892686
public function get( $key )
	{
		if ( isset($this->postData[ $key ]) )
		{
			return $this->postData[ $key ];
		}
		else
		{
			return null;
		}
	}
1284125
public function getValue($key)
    {
        $status = $this->provider->getStringValue($this->root, $this->path, $key, $value = new Variant());

        if($status === 0) {
            return (string) $value;
        }

        return null;
    }
534337
protected function checkValue($value, $key = null)
    {
        if ($value != null) {
            if ($key !== null) {
                return isset($value[$key]) ? $value[$key] : null;
            }

            return $value;
        }
    }