library canal
Content analysis for the purpose of determining Internet media types.
dflydev/canal
Content analysis for the purpose of determining Internet media types.
- Tuesday, May 14, 2013
- by simensen
- Repository
- 3 Watchers
- 31 Stars
- 48,328 Installations
- PHP
- 2 Dependents
- 0 Suggesters
- 4 Forks
- 0 Open issues
- 2 Versions
- 4 % Grown
Canal
Content analysis for the purpose of determining Internet media types., (*1)
Requirements
Installation
Through Composer as dflydev/canal., (*2)
Usage
<?php
// Instantiate the Analyzer
$analyzer = new Dflydev\Canal\Analyzer\Analyzer;
// Detect a media type from a filename (file does not need to exist)
$internetMediaType = $analyzer->detectFromFilename('/path/to/whatever.png');
// See the media type as a string
print $internetMediaType->asString()."\n\n";
// See the media type's type
print $internetMediaType->getType()."\n\n";
// See the media type's subtype
print $internetMediaType->getSubtype()."\n\n";
// image/png
//
// image
//
// png
License
MIT, see LICENSE., (*3)
Not Invented Here
This work was heavily influenced by Apache Tika and [Ferret][5]., (*4)
dev-master
9999999-dev
Content analysis for the purpose of determining Internet media types.
Sources
Download
MIT
The Requires
mime
content
type
detection
v1.0.0
1.0.0.0
Content analysis for the purpose of determining Internet media types.
Sources
Download
MIT
The Requires
mime
content
type
detection