-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
040b712
commit f432584
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Done\Subtitles\Code\Converters; | ||
|
||
use Done\Subtitles\Code\Helpers; | ||
use Done\Subtitles\Code\UserException; | ||
|
||
class BinaryFinder implements ConverterContract | ||
{ | ||
public function canParseFileContent($file_content) | ||
{ | ||
if (Helpers::strContains($file_content, "\x00")) { | ||
throw new UserException('This file is binary file and it is probably not a caption file.'); | ||
} | ||
|
||
return false; | ||
} | ||
|
||
public function fileContentToInternalFormat($file_content, $original_file_content) | ||
{ | ||
// no code needed | ||
} | ||
|
||
public function internalFormatToFileContent(array $internal_format , array $options) | ||
{ | ||
// no code needed | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters