FacturaScripts

BusinessDocumentGenerator
in package
uses ExtensionsTrait

Description of BusinessDocumentGenerator

Table of Contents

Properties

$extensionCache  : array<string|int, mixed>
Cache for extension lookups by method name.
$extensions  : array<string|int, mixed>
Stores class extensions.
$lastDocs  : array<string|int, mixed>
$sameDate  : bool

Methods

__call()  : mixed
Executes the first matched extension.
addExtension()  : void
clearExtensions()  : void
Clears all registered extensions.
copyRelatedFiles()  : bool
generate()  : bool
Generates a new document from a prototype document.
getExtensions()  : array<string|int, mixed>
Returns a list of all registered extension names.
getLastDocs()  : array<string|int, BusinessDocument>
hasExtension()  : bool
pipe()  : mixed
pipeFalse()  : bool
removeExtension()  : bool
Removes all extensions with the specified name.
setSameDate()  : mixed
cloneLines()  : bool
Clone the lines from the prototype document, to new document.
buildExtensionCache()  : void
Builds and caches sorted extensions for a method name.

Properties

$extensionCache

Cache for extension lookups by method name.

protected static array<string|int, mixed> $extensionCache = []

$extensions

Stores class extensions.

protected static array<string|int, mixed> $extensions = []

Methods

__call()

Executes the first matched extension.

public __call(string $name[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
$name : string
$arguments : array<string|int, mixed> = []
Tags
throws
BadMethodCallException

addExtension()

public static addExtension(mixed $extension[, int $priority = 100 ]) : void
Parameters
$extension : mixed
$priority : int = 100

Priority for all methods in this extension (0-1000, default 100)

clearExtensions()

Clears all registered extensions.

public static clearExtensions() : void

generate()

Generates a new document from a prototype document.

public generate(BusinessDocument $prototype, string $newClass[, array<string|int, mixed> $lines = [] ][, array<string|int, mixed> $quantity = [] ][, array<string|int, mixed> $properties = [] ]) : bool
Parameters
$prototype : BusinessDocument
$newClass : string
$lines : array<string|int, mixed> = []
$quantity : array<string|int, mixed> = []
$properties : array<string|int, mixed> = []
Return values
bool

getExtensions()

Returns a list of all registered extension names.

public static getExtensions() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasExtension()

public hasExtension(mixed $name) : bool
Parameters
$name : mixed
Return values
bool

pipe()

public pipe(string $name, array<string|int, mixed> ...$arguments) : mixed
Parameters
$name : string
$arguments : array<string|int, mixed>

pipeFalse()

public pipeFalse(string $name, array<string|int, mixed> ...$arguments) : bool
Parameters
$name : string
$arguments : array<string|int, mixed>
Return values
bool

removeExtension()

Removes all extensions with the specified name.

public static removeExtension(string $name) : bool
Parameters
$name : string
Return values
bool

True if at least one extension was removed

buildExtensionCache()

Builds and caches sorted extensions for a method name.

private buildExtensionCache(string $name) : void
Parameters
$name : string

        
On this page

Search results