PHP Class SimplePie_Content_Type_Sniffer, ojs

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::set_content_type_sniffer_class()}
Afficher le fichier Open project: pkp/ojs Class Usage Examples

Méthodes publiques

Свойство Type Description
$file SimplePie_File File object

Méthodes publiques

Méthode Description
SimplePie_Content_Type_Sniffer ( SimplePie_Content_Type_Sniffer $file ) Create an instance of the class with the input file
feed_or_html ( ) : string Sniff HTML
get_type ( ) : string Get the Content-Type of the specified file
image ( ) : string Sniff images
text_or_binary ( ) : string Sniff text or binary
unknown ( ) : string Sniff unknown

Method Details

SimplePie_Content_Type_Sniffer() public méthode

Create an instance of the class with the input file
public SimplePie_Content_Type_Sniffer ( SimplePie_Content_Type_Sniffer $file )
$file SimplePie_Content_Type_Sniffer Input file

feed_or_html() public méthode

Sniff HTML
public feed_or_html ( ) : string
Résultat string Actual Content-Type

get_type() public méthode

Get the Content-Type of the specified file
public get_type ( ) : string
Résultat string Actual Content-Type

image() public méthode

Sniff images
public image ( ) : string
Résultat string Actual Content-Type

text_or_binary() public méthode

Sniff text or binary
public text_or_binary ( ) : string
Résultat string Actual Content-Type

unknown() public méthode

Sniff unknown
public unknown ( ) : string
Résultat string Actual Content-Type

Property Details

$file public_oe property

File object
public SimplePie_File $file
Résultat SimplePie_File