Content-type sniffing.
More...
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 also
- SimplePie\SimplePie\set_content_type_sniffer_class()}
@subpackage HTTP
◆ __construct()
Sniffer::__construct |
( |
| $file | ) |
|
Create an instance of the class with the input file.
- Parameters
-
◆ feed_or_html()
Sniffer::feed_or_html |
( |
| ) |
|
Sniff HTML.
- Return values
-
string | Actual Content-Type |
◆ get_type()
Get the Content-Type of the specified file.
- Return values
-
string | Actual Content-Type |
◆ image()
Sniff images.
- Return values
-
string | Actual Content-Type |
◆ text_or_binary()
Sniffer::text_or_binary |
( |
| ) |
|
Sniff text or binary.
- Return values
-
string | Actual Content-Type |
◆ unknown()
Sniff unknown.
- Return values
-
string | Actual Content-Type |
The documentation for this class was generated from the following file:
- lib/simplepie/src/Content/Type/Sniffer.php