JSON::shouldStripWhitespace PHP Method

shouldStripWhitespace() private method

Wrapper function to find out whether the user wants whitespace to be enabled or not. The settings content is either JSON or a POST array, depending on where the generation is taking place.
private shouldStripWhitespace ( )
    private function shouldStripWhitespace()
    {
        $default = false;
        if ($this->genEnvironment == Constants::GEN_ENVIRONMENT_API) {
            $jsonSettings = $this->userSettings->export->settings;
            $stripWhitespace = property_exists($jsonSettings, "stripWhitespace") ? $jsonSettings->stripWhitespace : $default;
        } else {
            $stripWhitespace = isset($this->userSettings["etJSON_stripWhitespace"]);
        }
        return $stripWhitespace;
    }