PHP Class Mike42\Escpos\CapabilityProfile

Afficher le fichier Open project: mike42/escpos-php Class Usage Examples

Protected Properties

Свойство Type Description
$codePageCacheKey string Hash of the code page data structure, to identify it for caching.
$codePages array Associtive array of CodePage objects, indicating which encodings the printer supports.
$colors array Not used.
$encodings array Data structure containing encodings loaded from disk, null if not loaded yet.
$features array Feature values.
$fonts array Not used
$media array Not used
$name string Name of the profile, including model number.
$notes string Notes on the profile, null if not set.
$profileId string ID of the profile.
$profiles array Data structure containing profiles loaded from disk, null if not loaded yet.
$vendor string Name of manufacturer.

Méthodes publiques

Méthode Description
getCodePageCacheKey ( ) : string
getCodePages ( ) : array
getFeature ( string $featureName ) : mixed
getId ( ) : string
getName ( ) : string
getProfileNames ( ) : array
getSupportsBarcodeB ( ) : boolean
getSupportsBitImageRaster ( ) : boolean
getSupportsGraphics ( ) : boolean
getSupportsPdf417Code ( ) : boolean
getSupportsQrCode ( ) : boolean
getSupportsStarCommands ( ) : boolean
getVendor ( ) : string
load ( string $profileName ) : CapabilityProfile Retrieve the CapabilityProfile with the given ID.
suggestNearest ( string $input, array $choices, integer $num ) Return choices with smallest edit distance to an invalid input.

Méthodes protégées

Méthode Description
__construct ( unknown $profileId, array $profileData ) Construct new CapabilityProfile.
loadCapabilitiesDataFile ( ) Ensure that the capabilities.json data file has been loaded.
suggestFeatureName ( string $featureName ) : array
suggestProfileName ( string $profileName ) : array

Method Details

__construct() protected méthode

The encoding data must be loaded from disk before calling.
protected __construct ( unknown $profileId, array $profileData )
$profileId unknown ID of the profile
$profileData array Profile data from disk.

getCodePageCacheKey() public méthode

public getCodePageCacheKey ( ) : string
Résultat string Hash of the code page data structure, to identify it for caching.

getCodePages() public méthode

public getCodePages ( ) : array
Résultat array Associtive array of CodePage objects, indicating which encodings the printer supports.

getFeature() public méthode

public getFeature ( string $featureName ) : mixed
$featureName string Name of the feature to retrieve.
Résultat mixed feature value.

getId() public méthode

public getId ( ) : string
Résultat string ID of the profile.

getName() public méthode

public getName ( ) : string
Résultat string Name of the printer.

getProfileNames() public static méthode

public static getProfileNames ( ) : array
Résultat array Names of all profiles that exist.

getSupportsBarcodeB() public méthode

public getSupportsBarcodeB ( ) : boolean
Résultat boolean True if Barcode B command is supported, false otherwise

getSupportsBitImageRaster() public méthode

public getSupportsBitImageRaster ( ) : boolean
Résultat boolean True if Bit Image Raster command is supported, false otherwise

getSupportsGraphics() public méthode

public getSupportsGraphics ( ) : boolean
Résultat boolean True if Graphics command is supported, false otherwise

getSupportsPdf417Code() public méthode

public getSupportsPdf417Code ( ) : boolean
Résultat boolean True if PDF417 code command is supported, false otherwise

getSupportsQrCode() public méthode

public getSupportsQrCode ( ) : boolean
Résultat boolean True if QR code command is supported, false otherwise

getSupportsStarCommands() public méthode

public getSupportsStarCommands ( ) : boolean
Résultat boolean True if Star mode commands are supported, false otherwise

getVendor() public méthode

public getVendor ( ) : string
Résultat string Vendor of this printer.

load() public static méthode

Retrieve the CapabilityProfile with the given ID.
public static load ( string $profileName ) : CapabilityProfile
$profileName string The ID of the profile to load.
Résultat CapabilityProfile The CapabilityProfile that was requested.

loadCapabilitiesDataFile() protected static méthode

Ensure that the capabilities.json data file has been loaded.
protected static loadCapabilitiesDataFile ( )

suggestFeatureName() protected méthode

protected suggestFeatureName ( string $featureName ) : array
$featureName string Feature that does not exist
Résultat array Three most similar feature names that do exist.

suggestNearest() public static méthode

Return choices with smallest edit distance to an invalid input.
public static suggestNearest ( string $input, array $choices, integer $num )
$input string Input that is not a valid choice
$choices array Array of valid choices.
$num integer Number of suggestions to return

suggestProfileName() protected static méthode

protected static suggestProfileName ( string $profileName ) : array
$profileName string profile name that does not exist
Résultat array Three similar profile names that do exist, plus 'simple' and 'default' for good measure.

Property Details

$codePageCacheKey protected_oe property

Hash of the code page data structure, to identify it for caching.
protected string $codePageCacheKey
Résultat string

$codePages protected_oe property

Associtive array of CodePage objects, indicating which encodings the printer supports.
protected array $codePages
Résultat array

$colors protected_oe property

Not used.
protected array $colors
Résultat array

$encodings protected_oe static_oe property

Data structure containing encodings loaded from disk, null if not loaded yet.
protected static array $encodings
Résultat array

$features protected_oe property

Feature values.
protected array $features
Résultat array

$fonts protected_oe property

Not used
protected array $fonts
Résultat array

$media protected_oe property

Not used
protected array $media
Résultat array

$name protected_oe property

Name of the profile, including model number.
protected string $name
Résultat string

$notes protected_oe property

Notes on the profile, null if not set.
protected string $notes
Résultat string

$profileId protected_oe property

ID of the profile.
protected string $profileId
Résultat string

$profiles protected_oe static_oe property

Data structure containing profiles loaded from disk, null if not loaded yet.
protected static array $profiles
Résultat array

$vendor protected_oe property

Name of manufacturer.
protected string $vendor
Résultat string