/** * Checks whether the content of this page/file should be streamed directly to file. * * @param string $response_header The response-header * @return bool TRUE if the content should be streamed to TMP-file */ protected function decideStreamToFile($response_header) { if (count($this->receive_to_file_content_types) == 0) { return false; } // Get Content-Type from header $content_type = PHPCrawlerUtils::getHeaderValue($response_header, "content-type"); // No Content-Type given if ($content_type == null) { return false; } // Check against the given rules $receive = PHPCrawlerUtils::checkStringAgainstRegexArray($content_type, $this->receive_to_file_content_types); return $receive; }