StringParser
in package
Class StringParser
Table of Contents
- ALLOWED_FILE_TYPES = [ 'application/zip', // linux 'application/x-zip-compressed', ]
- toZip() : string
- Validates Zip string and stores a valid .zip file to the temporary directory
- checkMemoryForProcess() : bool
- Check if the available memory is enough to handle process
- getBytesValue() : int
Constants
ALLOWED_FILE_TYPES
protected
array<string|int, string>
ALLOWED_FILE_TYPES
= [
'application/zip',
// linux
'application/x-zip-compressed',
]
Methods
toZip()
Validates Zip string and stores a valid .zip file to the temporary directory
public
toZip(string $string) : string
Parameters
- $string : string
-
must contain zip file
Tags
Return values
string —path to zip file in tmp directory
checkMemoryForProcess()
Check if the available memory is enough to handle process
protected
checkMemoryForProcess(int $processSize) : bool
Parameters
- $processSize : int
Return values
bool —getBytesValue()
private
getBytesValue( $val) : int