Inpsyde\MultilingualPress\Translation\FullRequestDataManipulator::clear_data PHP Method

clear_data() public method

Removes all data from the request global.
Since: 3.0.0
public clear_data ( ) : integer
return integer Number of cleared elements.
    public function clear_data()
    {
        if (empty($GLOBALS["_{$this->request_method}"])) {
            return 0;
        }
        $this->storage = $GLOBALS["_{$this->request_method}"];
        $_REQUEST = array_diff_key($_REQUEST, $this->storage);
        $GLOBALS["_{$this->request_method}"] = [];
        return count($this->storage);
    }