Overview

Packages

  • None
  • SimplePie

Classes

  • SimplePie
  • SimplePie_Author
  • SimplePie_Autoloader
  • SimplePie_Cache
  • SimplePie_Cache_DB
  • SimplePie_Cache_File
  • SimplePie_Cache_Memcache
  • SimplePie_Cache_MySQL
  • SimplePie_Caption
  • SimplePie_Category
  • SimplePie_Content_Type_Sniffer
  • SimplePie_Copyright
  • SimplePie_Core
  • SimplePie_Credit
  • SimplePie_Decode_HTML_Entities
  • SimplePie_Enclosure
  • SimplePie_File
  • SimplePie_gzdecode
  • SimplePie_HTTP_Parser
  • SimplePie_IRI
  • SimplePie_Item
  • SimplePie_Locator
  • SimplePie_Misc
  • SimplePie_Net_IPv6
  • SimplePie_Parse_Date
  • SimplePie_Parser
  • SimplePie_Rating
  • SimplePie_Registry
  • SimplePie_Restriction
  • SimplePie_Sanitize
  • SimplePie_Source
  • SimplePie_XML_Declaration_Parser

Interfaces

  • SimplePie_Cache_Base
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class SimplePie_Content_Type_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 SimplePie_Core::set_content_type_sniffer_class()

Package: SimplePie
Located at SimplePie/Content/Type/Sniffer.php
Methods summary
public
# __construct( SimplePie_Content_Type_Sniffer $file )

Create an instance of the class with the input file

Create an instance of the class with the input file

Parameters

$file
SimplePie_Content_Type_Sniffer
Input file
public string
# get_type( )

Get the Content-Type of the specified file

Get the Content-Type of the specified file

Returns

string
Actual Content-Type
public string
# text_or_binary( )

Sniff text or binary

Sniff text or binary

Returns

string
Actual Content-Type
public string
# unknown( )

Sniff unknown

Sniff unknown

Returns

string
Actual Content-Type
public string
# image( )

Sniff images

Sniff images

Returns

string
Actual Content-Type
public string
# feed_or_html( )

Sniff HTML

Sniff HTML

Returns

string
Actual Content-Type
Properties summary
public SimplePie_File $file
#

File object

File object

SimplePie Documentation API documentation generated by ApiGen 2.4.0