Sniffer
Content-type sniffing
Based on the rules in http://tools.ietf.org/html/draft-abarth-mime-sniff-06
This is used since we can't always trust Content-Type headers, and is based upon the HTML5 parsing rules.
This class can be overloaded with {@see \SimplePie\SimplePie::set_content_type_sniffer_class()}
- Full name:
\SimplePie\Content\Type\Sniffer
Properties
file
File object
Methods
__construct
Create an instance of the class with the input file
Parameters:
Parameter | Type | Description |
---|---|---|
$file |
\SimplePie\Content\Type\Sniffer | Input file |
get_type
Get the Content-Type of the specified file
Return Value:
Actual Content-Type
text_or_binary
Sniff text or binary
Return Value:
Actual Content-Type
unknown
Sniff unknown
Return Value:
Actual Content-Type
image
Sniff images
Return Value:
Actual Content-Type
feed_or_html
Sniff HTML
Return Value:
Actual Content-Type
Automatically generated on 2025-03-18