getSimpleType() public method

Returns simpletype metadata value if set, otherwise parses it from mimetype
See also: elgg_get_file_simple_type
public getSimpleType ( ) : string
return string 'document', 'audio', 'video', or 'general' if the MIME type was unrecognized
Exemplo n.º 1
0
 /**
  * @group FileService
  * @dataProvider providerSimpleTypeMap
  */
 public function testCanParseSimpleType($mime_type, $simple_type)
 {
     unset($this->file->simpletype);
     $this->file->mimetype = $mime_type;
     $this->assertEquals($simple_type, $this->file->getSimpleType());
 }