PdfStructurePersistenceStrategyPdo
in package
implements
PdfStructurePersistenceStrategy
Manages PDF structures on file system.
Interfaces, Classes, Traits and Enums
- PdfStructurePersistenceStrategy
- Interface for PDF structure persistence.
Table of Contents
- TABLE_NAME = 'pdf_structures'
- TABLE_NAME_LOGOS = 'pdf_logos'
- TABLE_NAME_TEMPLATES = 'pdf_structures_templates'
- TABLE_NAME_TEMPLATES_LOGOS = 'pdf_logos_templates'
- $pdo : PDO
- __construct() : mixed
- Constructor
- createInitialSchema() : void
- Creates the initial schema.
- deletePdfLogo() : void
- Deletes a PDF logo.
- deletePdfStructure() : void
- Deletes a PDF structure.
- deletePdfStructureTemplate() : void
- Deletes a PDF structure template,
- deletePdfTemplateLogo() : void
- Deletes a logo in global templates.
- getPdfLogoBinary() : string
- Reads a PDF logo.
- getPdfLogoNames() : array<string|int, string>
- Returns the list of available PDF logos.
- getPDFStructures() : array<string|int, string>
- Returns all available PDF structure definitions for the submitted account type.
- getPdfStructureTemplateNames() : array<string|int, mixed>
- Returns the names of existing PDF structure templates.
- getPdfTemplateLogoBinary() : string
- Returns the binary data for the given template logo.
- getPdfTemplateLogoNames() : array<string|int, string>
- Returns a list of template logo file names.
- readPdfStructure() : PDFStructure
- Reads a PDF structure.
- readPdfStructureTemplate() : PDFStructure
- Reads a PDF structure template.
- savePdfLogo() : void
- Saves a PDF logo.
- savePdfStructure() : void
- Saves the PDF structure.
- savePdfStructureTemplate() : void
- Saves the PDF structure.
- savePdfTemplateLogo() : void
- Saves the template logo.
- checkSchema() : void
- Checks if the schema has latest version.
Constants
TABLE_NAME
public
mixed
TABLE_NAME
= 'pdf_structures'
TABLE_NAME_LOGOS
public
mixed
TABLE_NAME_LOGOS
= 'pdf_logos'
TABLE_NAME_TEMPLATES
public
mixed
TABLE_NAME_TEMPLATES
= 'pdf_structures_templates'
TABLE_NAME_TEMPLATES_LOGOS
public
mixed
TABLE_NAME_TEMPLATES_LOGOS
= 'pdf_logos_templates'
Properties
$pdo
private
PDO
$pdo
Methods
__construct()
Constructor
public
__construct(PDO $pdo) : mixed
Parameters
- $pdo : PDO
-
PDO
Return values
mixed —createInitialSchema()
Creates the initial schema.
public
createInitialSchema() : void
Return values
void —deletePdfLogo()
Deletes a PDF logo.
public
deletePdfLogo(string $confName, string $name) : void
Parameters
- $confName : string
-
server profile name
- $name : string
-
logo name
Tags
Return values
void —deletePdfStructure()
Deletes a PDF structure.
public
deletePdfStructure(string $confName, string $typeId, string $name) : void
Parameters
- $confName : string
-
server profile name
- $typeId : string
-
user/group/host
- $name : string
-
structure name
Tags
Return values
void —deletePdfStructureTemplate()
Deletes a PDF structure template,
public
deletePdfStructureTemplate(string $scope, string $name) : void
Parameters
- $scope : string
-
user/group/host
- $name : string
-
template name
Tags
Return values
void —deletePdfTemplateLogo()
Deletes a logo in global templates.
public
deletePdfTemplateLogo(string $name) : void
Parameters
- $name : string
-
logo name
Tags
Return values
void —getPdfLogoBinary()
Reads a PDF logo.
public
getPdfLogoBinary(string $confName, string $name) : string
Parameters
- $confName : string
-
server profile name
- $name : string
-
file name
Tags
Return values
string —binary data
getPdfLogoNames()
Returns the list of available PDF logos.
public
getPdfLogoNames(string $confName) : array<string|int, string>
Parameters
- $confName : string
-
server profile name
Tags
Return values
array<string|int, string> —logos
getPDFStructures()
Returns all available PDF structure definitions for the submitted account type.
public
getPDFStructures(string $confName, string $typeId) : array<string|int, string>
Parameters
- $confName : string
-
server profile name
- $typeId : string
-
the account type
Tags
Return values
array<string|int, string> —structure names
getPdfStructureTemplateNames()
Returns the names of existing PDF structure templates.
public
getPdfStructureTemplateNames() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —scope => names (e.g. array('user' => array('default')))
getPdfTemplateLogoBinary()
Returns the binary data for the given template logo.
public
getPdfTemplateLogoBinary(string $name) : string
Parameters
- $name : string
-
file name
Tags
Return values
string —binary
getPdfTemplateLogoNames()
Returns a list of template logo file names.
public
getPdfTemplateLogoNames() : array<string|int, string>
Tags
Return values
array<string|int, string> —logo file names
readPdfStructure()
Reads a PDF structure.
public
readPdfStructure(string $confName, string $typeId, string $name) : PDFStructure
Parameters
- $confName : string
-
server profile name
- $typeId : string
-
user/group/host
- $name : string
-
structure name
Tags
Return values
PDFStructure —PDF structure
readPdfStructureTemplate()
Reads a PDF structure template.
public
readPdfStructureTemplate(string $scope, string $name) : PDFStructure
Parameters
- $scope : string
-
user/group/host
- $name : string
-
structure name
Tags
Return values
PDFStructure —PDF structure
savePdfLogo()
Saves a PDF logo.
public
savePdfLogo(string $confName, string $name, string $data) : void
Parameters
- $confName : string
-
server profile name
- $name : string
-
logo name
- $data : string
-
binary
Tags
Return values
void —savePdfStructure()
Saves the PDF structure.
public
savePdfStructure(string $confName, string $typeId, string $name, PDFStructure $structure) : void
Parameters
- $confName : string
-
server profile name
- $typeId : string
-
user/group/host
- $name : string
-
structure name
- $structure : PDFStructure
-
structure
Tags
Return values
void —savePdfStructureTemplate()
Saves the PDF structure.
public
savePdfStructureTemplate(string $scope, string $name, PDFStructure $structure) : void
Parameters
- $scope : string
-
user/group/host
- $name : string
-
structure name
- $structure : PDFStructure
-
structure
Tags
Return values
void —savePdfTemplateLogo()
Saves the template logo.
public
savePdfTemplateLogo(string $name, string $data) : void
Parameters
- $name : string
-
file name
- $data : string
-
binary data
Tags
Return values
void —checkSchema()
Checks if the schema has latest version.
private
checkSchema() : void