Mike42\Escpos\CapabilityProfile::__construct PHP Method

__construct() protected method

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.
    protected function __construct($profileId, array $profileData)
    {
        // Basic primitive fields
        $this->profileId = $profileId;
        $this->name = $profileData['name'];
        $this->notes = $profileData['notes'];
        $this->vendor = $profileData['vendor'];
        // More complex fields that are not currently loaded into custom objects
        $this->features = $profileData['features'];
        $this->colors = $profileData['colors'];
        $this->fonts = $profileData['fonts'];
        $this->media = $profileData['media'];
        // More complex fields that are loaded into custom objects
        $this->codePages = array();
        $this->codePageCacheKey = md5(json_encode($profileData['codePages']));
        foreach ($profileData['codePages'] as $k => $v) {
            $this->codePages[$k] = new CodePage($v, self::$encodings[$v]);
        }
    }