PHP Класс Mike42\Escpos\CapabilityProfile

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
__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

Описание методов

__construct() защищенный Метод

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 getCodePageCacheKey ( ) : string
Результат string Hash of the code page data structure, to identify it for caching.

getCodePages() публичный Метод

public getCodePages ( ) : array
Результат array Associtive array of CodePage objects, indicating which encodings the printer supports.

getFeature() публичный Метод

public getFeature ( string $featureName ) : mixed
$featureName string Name of the feature to retrieve.
Результат mixed feature value.

getId() публичный Метод

public getId ( ) : string
Результат string ID of the profile.

getName() публичный Метод

public getName ( ) : string
Результат string Name of the printer.

getProfileNames() публичный статический Метод

public static getProfileNames ( ) : array
Результат array Names of all profiles that exist.

getSupportsBarcodeB() публичный Метод

public getSupportsBarcodeB ( ) : boolean
Результат boolean True if Barcode B command is supported, false otherwise

getSupportsBitImageRaster() публичный Метод

public getSupportsBitImageRaster ( ) : boolean
Результат boolean True if Bit Image Raster command is supported, false otherwise

getSupportsGraphics() публичный Метод

public getSupportsGraphics ( ) : boolean
Результат boolean True if Graphics command is supported, false otherwise

getSupportsPdf417Code() публичный Метод

public getSupportsPdf417Code ( ) : boolean
Результат boolean True if PDF417 code command is supported, false otherwise

getSupportsQrCode() публичный Метод

public getSupportsQrCode ( ) : boolean
Результат boolean True if QR code command is supported, false otherwise

getSupportsStarCommands() публичный Метод

public getSupportsStarCommands ( ) : boolean
Результат boolean True if Star mode commands are supported, false otherwise

getVendor() публичный Метод

public getVendor ( ) : string
Результат string Vendor of this printer.

load() публичный статический Метод

Retrieve the CapabilityProfile with the given ID.
public static load ( string $profileName ) : CapabilityProfile
$profileName string The ID of the profile to load.
Результат CapabilityProfile The CapabilityProfile that was requested.

loadCapabilitiesDataFile() защищенный статический Метод

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

suggestFeatureName() защищенный Метод

protected suggestFeatureName ( string $featureName ) : array
$featureName string Feature that does not exist
Результат array Three most similar feature names that do exist.

suggestNearest() публичный статический Метод

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 suggestProfileName ( string $profileName ) : array
$profileName string profile name that does not exist
Результат array Three similar profile names that do exist, plus 'simple' and 'default' for good measure.

Описание свойств

$codePageCacheKey защищенное свойство

Hash of the code page data structure, to identify it for caching.
protected string $codePageCacheKey
Результат string

$codePages защищенное свойство

Associtive array of CodePage objects, indicating which encodings the printer supports.
protected array $codePages
Результат array

$colors защищенное свойство

Not used.
protected array $colors
Результат array

$encodings защищенное статическое свойство

Data structure containing encodings loaded from disk, null if not loaded yet.
protected static array $encodings
Результат array

$features защищенное свойство

Feature values.
protected array $features
Результат array

$fonts защищенное свойство

Not used
protected array $fonts
Результат array

$media защищенное свойство

Not used
protected array $media
Результат array

$name защищенное свойство

Name of the profile, including model number.
protected string $name
Результат string

$notes защищенное свойство

Notes on the profile, null if not set.
protected string $notes
Результат string

$profileId защищенное свойство

ID of the profile.
protected string $profileId
Результат string

$profiles защищенное статическое свойство

Data structure containing profiles loaded from disk, null if not loaded yet.
protected static array $profiles
Результат array

$vendor защищенное свойство

Name of manufacturer.
protected string $vendor
Результат string