escpos-php
|
Store compatibility information about one printer. More...
Public Member Functions | |
getCodePageCacheKey () | |
getCodePages () | |
getFeature ($featureName) | |
getId () | |
getName () | |
getSupportsBarcodeB () | |
getSupportsBitImageRaster () | |
getSupportsGraphics () | |
getSupportsPdf417Code () | |
getSupportsQrCode () | |
getSupportsStarCommands () | |
getVendor () | |
Static Public Member Functions | |
static | getProfileNames () |
static | load (string $profileName) |
Retrieve the CapabilityProfile with the given ID. More... | |
static | suggestNearest (string $input, array $choices, int $num) |
Return choices with smallest edit distance to an invalid input. More... | |
Protected Member Functions | |
__construct (string $profileId, array $profileData) | |
Construct new CapabilityProfile. More... | |
suggestFeatureName (string $featureName) | |
Static Protected Member Functions | |
static | loadCapabilitiesDataFile () |
Ensure that the capabilities.json data file has been loaded. | |
static | suggestProfileName (string $profileName) |
Protected Attributes | |
$codePageCacheKey | |
Hash of the code page data structure, to identify it for caching. | |
$codePages | |
Associtive array of CodePage objects, indicating which encodings the printer supports. | |
$colors | |
Not used. | |
$features | |
Feature values. | |
$fonts | |
Not used. | |
$media | |
Not used. | |
$name | |
Name of the profile, including model number. | |
$notes | |
Notes on the profile, null if not set. | |
$profileId | |
ID of the profile. | |
$vendor | |
Name of manufacturer. | |
Static Protected Attributes | |
static | $encodings = null |
Data structure containing encodings loaded from disk, null if not loaded yet. | |
static | $profiles = null |
Data structure containing profiles loaded from disk, null if not loaded yet. | |
Store compatibility information about one printer.
|
protected |
Construct new CapabilityProfile.
The encoding data must be loaded from disk before calling.
string | $profileId | ID of the profile |
array | $profileData | Profile data from disk. |
Mike42\Escpos\CapabilityProfile::getCodePageCacheKey | ( | ) |
Mike42\Escpos\CapabilityProfile::getCodePages | ( | ) |
Mike42\Escpos\CapabilityProfile::getFeature | ( | $featureName | ) |
string | $featureName | Name of the feature to retrieve. |
Mike42\Escpos\CapabilityProfile::getId | ( | ) |
Mike42\Escpos\CapabilityProfile::getName | ( | ) |
|
static |
Mike42\Escpos\CapabilityProfile::getSupportsBarcodeB | ( | ) |
Mike42\Escpos\CapabilityProfile::getSupportsBitImageRaster | ( | ) |
Mike42\Escpos\CapabilityProfile::getSupportsGraphics | ( | ) |
Mike42\Escpos\CapabilityProfile::getSupportsPdf417Code | ( | ) |
Mike42\Escpos\CapabilityProfile::getSupportsQrCode | ( | ) |
Mike42\Escpos\CapabilityProfile::getSupportsStarCommands | ( | ) |
Mike42\Escpos\CapabilityProfile::getVendor | ( | ) |
|
static |
Retrieve the CapabilityProfile with the given ID.
string | $profileName | The ID of the profile to load. |
InvalidArgumentException | Where the ID does not exist. Some similarly-named profiles will be suggested in the Exception text. |
|
protected |
string | $featureName | Feature that does not exist |
|
static |
Return choices with smallest edit distance to an invalid input.
string | $input | Input that is not a valid choice |
array | $choices | Array of valid choices. |
int | $num | Number of suggestions to return |
|
staticprotected |
string | $profileName | profile name that does not exist |