FileHelper
in package
Table of Contents
Constants
- MESSAGE_UPLOAD_ERROR = [0 => 'There is no error, the file uploaded with success', 1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini', 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', 3 => 'The uploaded file was only partially uploaded', 4 => 'No file was uploaded', 6 => 'Missing a temporary folder', 7 => 'Failed to write file to disk', 8 => 'A PHP extension stopped the file upload']
Methods
- getModelTemplate() : mixed
- getPositionFile() : mixed
- getTempfile() : mixed
- getTemplateCompraProduto() : mixed
- getTemplateComprovanteRemessa() : mixed
- getTemplateEmail() : mixed
- Função que retorna o template de email
- getTemplateEventoFuncionario() : mixed
- getTemplatePlanejamentoAgricola() : mixed
- getTemplateProducao() : mixed
- getTemplateReceipt() : mixed
- getTemplateSystem() : mixed
- Função que retorna o template de sistema
- getTemplateTicketEmprestimo() : mixed
- getTemplateTicketPesagem() : mixed
- getTemplateTrabalhista() : mixed
- validateFileEmpty() : bool
- validateFileExist() : mixed
- validateFileExtension() : bool
- Função para verificar se o arquivo passado tem uma extensão valida.
- validateFileSize() : bool
- Função para verificar o tamanho do arquivo
- getTemplate() : mixed
Constants
MESSAGE_UPLOAD_ERROR
public
mixed
MESSAGE_UPLOAD_ERROR
= [0 => 'There is no error, the file uploaded with success', 1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini', 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', 3 => 'The uploaded file was only partially uploaded', 4 => 'No file was uploaded', 6 => 'Missing a temporary folder', 7 => 'Failed to write file to disk', 8 => 'A PHP extension stopped the file upload']
Methods
getModelTemplate()
public
static getModelTemplate(mixed $templateDomain, mixed $templateName) : mixed
Parameters
- $templateDomain : mixed
- $templateName : mixed
getPositionFile()
public
static getPositionFile(mixed $row, mixed $start, mixed $lenght) : mixed
Parameters
- $row : mixed
- $start : mixed
- $lenght : mixed
getTempfile()
public
static getTempfile([string $extension = '' ]) : mixed
Parameters
- $extension : string = ''
getTemplateCompraProduto()
public
static getTemplateCompraProduto() : mixed
getTemplateComprovanteRemessa()
public
static getTemplateComprovanteRemessa(mixed $templateName) : mixed
Parameters
- $templateName : mixed
getTemplateEmail()
Função que retorna o template de email
public
static getTemplateEmail(mixed $templateName) : mixed
Parameters
- $templateName : mixed
getTemplateEventoFuncionario()
public
static getTemplateEventoFuncionario(mixed $templateName) : mixed
Parameters
- $templateName : mixed
getTemplatePlanejamentoAgricola()
public
static getTemplatePlanejamentoAgricola() : mixed
getTemplateProducao()
public
static getTemplateProducao(mixed $templateName) : mixed
Parameters
- $templateName : mixed
getTemplateReceipt()
public
static getTemplateReceipt(mixed $templateName) : mixed
Parameters
- $templateName : mixed
getTemplateSystem()
Função que retorna o template de sistema
public
static getTemplateSystem(mixed $templateName) : mixed
Parameters
- $templateName : mixed
getTemplateTicketEmprestimo()
public
static getTemplateTicketEmprestimo(mixed $templateName) : mixed
Parameters
- $templateName : mixed
getTemplateTicketPesagem()
public
static getTemplateTicketPesagem(mixed $templateName) : mixed
Parameters
- $templateName : mixed
getTemplateTrabalhista()
public
static getTemplateTrabalhista(mixed $templateName) : mixed
Parameters
- $templateName : mixed
validateFileEmpty()
public
static validateFileEmpty(mixed $file) : bool
Parameters
- $file : mixed
Return values
boolvalidateFileExist()
public
static validateFileExist(mixed $file) : mixed
Parameters
- $file : mixed
validateFileExtension()
Função para verificar se o arquivo passado tem uma extensão valida.
public
static validateFileExtension(mixed $file, mixed $settings) : bool
Parameters
- $file : mixed
- $settings : mixed
Return values
boolvalidateFileSize()
Função para verificar o tamanho do arquivo
public
static validateFileSize(mixed $file, mixed $settings) : bool
Parameters
- $file : mixed
- $settings : mixed
Return values
boolgetTemplate()
private
static getTemplate(mixed $templateDomain, mixed $templateName) : mixed
Parameters
- $templateDomain : mixed
- $templateName : mixed