UserVatCertificatesService
Table of Contents
Constants
-
FILE_UPLOAD_KEY
= '_certificate_file'
-
STORAGE_RELATIVE_PATH_PART
= 'imports' . DS . 'certificates' . DS
Properties
-
$storage
: GoogleCloudStorageComponent
-
$certificateDate
: mixed
-
$certificateType
: mixed
-
$cloudStorageService
: CloudStorageService
-
$filename
: mixed
-
$response
: Response
-
$userVat
: UserVat
-
$userVatCertificateRepository
: UserVatCertificateRepository
Methods
-
__construct()
: mixed
-
handleDownloadFile()
: mixed
-
handleSaveFile()
: array<string|int, mixed>|null
-
deleteLocalFile()
: mixed
-
getCertificateType()
: string|null
-
getCloudFullPath()
: string
-
getCloudUploadPath()
: string
-
getExtension()
: mixed
-
getFilename()
: mixed
-
getLocalFilePath()
: string
-
getStorageRelativePathPart()
: string
-
getUploadFolderPath()
: string
-
getUploadHandler()
: FileUpload
-
getUserVat()
: UserVat|null
-
saveToCloud()
: mixed
-
createDirectoryIfNeeded()
: mixed
-
downloadTaxUserVatCertificate()
: mixed
-
downloadVatUserVatCertificate()
: mixed
-
getBucket()
: mixed
-
getCertificateDate()
: DateTime|null
-
getCloudFileName()
: string
-
getCloudFolderPath()
: string
-
handleGcUpload()
: void
-
saveLocalFile()
: mixed
-
saveTaxUserVatCertificate()
: array<string|int, mixed>
-
saveUserVatCertificate()
: array<string|int, mixed>|null
-
saveVatUserVatCertificate()
: array<string|int, mixed>
FILE_UPLOAD_KEY
public
mixed
FILE_UPLOAD_KEY
= '_certificate_file'
STORAGE_RELATIVE_PATH_PART
public
mixed
STORAGE_RELATIVE_PATH_PART
= 'imports' . DS . 'certificates' . DS
$storage
protected
GoogleCloudStorageComponent
$storage
$certificateDate
private
mixed
$certificateDate
$certificateType
private
mixed
$certificateType
$cloudStorageService
private
CloudStorageService
$cloudStorageService
$filename
private
mixed
$filename
$response
private
Response
$response
$userVat
private
UserVat
$userVat
$userVatCertificateRepository
private
UserVatCertificateRepository
$userVatCertificateRepository
__construct()
public
__construct(Response $response, GoogleCloudStorageComponent $storage, CloudStorageService $cloudStorageService, UserVatCertificateRepository $userVatCertificateRepository) : mixed
Parameters
-
$response
: Response
-
-
$storage
: GoogleCloudStorageComponent
-
-
$cloudStorageService
: CloudStorageService
-
-
$userVatCertificateRepository
: UserVatCertificateRepository
-
handleDownloadFile()
public
handleDownloadFile(string $certificateType, mixed $userVat) : mixed
Parameters
-
$certificateType
: string
-
-
$userVat
: mixed
-
-
throws
-
Exception
handleSaveFile()
public
handleSaveFile(FileInterface $certificateFile, string $certificateType, UserVat $userVat) : array<string|int, mixed>|null
Parameters
-
$certificateFile
: FileInterface
-
-
$certificateType
: string
-
-
$userVat
: UserVat
-
-
throws
-
ResourceNotFoundException
Return values
array<string|int, mixed>|null
deleteLocalFile()
protected
deleteLocalFile() : mixed
-
throws
-
ResourceNotFoundException
getCertificateType()
protected
getCertificateType() : string|null
-
throws
-
ResourceNotFoundException
Return values
string|null
getCloudFullPath()
protected
getCloudFullPath() : string
-
throws
-
ResourceNotFoundException
getCloudUploadPath()
protected
getCloudUploadPath() : string
-
throws
-
ResourceNotFoundException
getExtension()
protected
getExtension() : mixed
getFilename()
protected
getFilename() : mixed
getLocalFilePath()
protected
getLocalFilePath() : string
-
throws
-
ResourceNotFoundException
getStorageRelativePathPart()
protected
getStorageRelativePathPart() : string
getUploadFolderPath()
protected
getUploadFolderPath() : string
-
throws
-
ResourceNotFoundException
getUploadHandler()
protected
getUploadHandler() : FileUpload
-
throws
-
ResourceNotFoundException
getUserVat()
protected
getUserVat() : UserVat|null
-
throws
-
ResourceNotFoundException
saveToCloud()
protected
saveToCloud() : mixed
-
throws
-
UploadErrorException
-
throws
-
ResourceNotFoundException
createDirectoryIfNeeded()
private
createDirectoryIfNeeded(mixed $path) : mixed
Parameters
-
$path
: mixed
-
downloadTaxUserVatCertificate()
private
downloadTaxUserVatCertificate(UserVat $userVat) : mixed
Parameters
-
$userVat
: UserVat
-
-
throws
-
FileNotFoundException
downloadVatUserVatCertificate()
private
downloadVatUserVatCertificate(UserVat $userVat) : mixed
Parameters
-
$userVat
: UserVat
-
-
throws
-
FileNotFoundException
getBucket()
private
getBucket() : mixed
getCertificateDate()
private
getCertificateDate() : DateTime|null
-
throws
-
ResourceNotFoundException
Return values
DateTime|null
getCloudFileName()
private
getCloudFileName() : string
-
throws
-
ResourceNotFoundException
getCloudFolderPath()
private
getCloudFolderPath() : string
-
throws
-
ResourceNotFoundException
handleGcUpload()
private
handleGcUpload() : void
saveLocalFile()
private
saveLocalFile() : mixed
-
throws
-
FileValidationExceptionIntegrity|ResourceNotFoundException
saveTaxUserVatCertificate()
private
saveTaxUserVatCertificate() : array<string|int, mixed>
-
throws
-
ResourceNotFoundException
-
throws
-
ORMException|DataException
Return values
array<string|int, mixed>
saveUserVatCertificate()
private
saveUserVatCertificate() : array<string|int, mixed>|null
-
throws
-
ResourceNotFoundException
-
throws
-
Exception
Return values
array<string|int, mixed>|null
saveVatUserVatCertificate()
private
saveVatUserVatCertificate() : array<string|int, mixed>
-
throws
-
OptimisticLockException
-
throws
-
ResourceNotFoundException
-
throws
-
ORMException
-
throws
-
DataException
Return values
array<string|int, mixed>