Elgg\Filesystem\MimeTypeDetector::tryStrategies PHP Method

tryStrategies() public method

Detect MIME type using various strategies
public tryStrategies ( string $file ) : string
$file string File path
return string Type detected. Empty string on failure
    public function tryStrategies($file)
    {
        $type = '';
        foreach ($this->strategies as $strategy) {
            $type = call_user_func($strategy, $file);
            if ($type) {
                break;
            }
        }
        return $type;
    }