<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.8">
  <compounddef id="CapabilityProfile_8php" kind="file">
    <compoundname>CapabilityProfile.php</compoundname>
    <innerclass refid="classMike42_1_1Escpos_1_1CapabilityProfile" prot="public">Mike42::Escpos::CapabilityProfile</innerclass>
    <innernamespace refid="namespaceMike42_1_1Escpos">Mike42::Escpos</innernamespace>
    <innernamespace refid="namespaceInvalidArgumentException">InvalidArgumentException</innernamespace>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="normal">&lt;?php</highlight></codeline>
<codeline lineno="13" refid="namespaceMike42_1_1Escpos" refkind="compound"><highlight class="keyword">namespace<sp/></highlight><highlight class="normal"><ref refid="namespaceMike42_1_1Escpos" kindref="compound">Mike42\Escpos</ref>;</highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal">use<sp/>\InvalidArgumentException;</highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight></codeline>
<codeline lineno="20" refid="classMike42_1_1Escpos_1_1CapabilityProfile" refkind="compound"><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile" kindref="compound">CapabilityProfile</ref></highlight></codeline>
<codeline lineno="21"><highlight class="normal">{</highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1afcae275cdd9071e200189f7ac1935a2a" kindref="member">$codePageCacheKey</ref>;</highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a997c0131facd5cc9105eb67dfb3436a9" kindref="member">$codePages</ref>;</highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a1de8c0e7d9111e814a47d41681b17d3d" kindref="member">$colors</ref>;</highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1acdec9fac0883b826754d76c259ee70af" kindref="member">$features</ref>;</highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1adefddc2a6eea15d169b4a468a7032926" kindref="member">$fonts</ref>;</highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a1244b2868046398e87ee40ea055002ca" kindref="member">$media</ref>;</highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a916ee28a3851967bf0e476c2b4a379c2" kindref="member">$name</ref>;</highlight></codeline>
<codeline lineno="71"><highlight class="normal"></highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a0141ea939f5423ff8c3c09b1e6671f9c" kindref="member">$notes</ref>;</highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1ada45b82ed360c9200571984c26814646" kindref="member">$profileId</ref>;</highlight></codeline>
<codeline lineno="85"><highlight class="normal"></highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1ae014cd205147bd6aa37f080d35922a09" kindref="member">$vendor</ref>;</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a4aed89e6fa275b6b4dae6a59b5ff7057" kindref="member">$encodings</ref><sp/>=<sp/>null;</highlight></codeline>
<codeline lineno="99"><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a7f0426d2132b735d520d52ab1ac66b15" kindref="member">$profiles</ref><sp/>=<sp/>null;</highlight></codeline>
<codeline lineno="106"><highlight class="normal"></highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1ac4fc991e5b6b64d211251bf1b182c474" kindref="member">__construct</ref>(<ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1ada45b82ed360c9200571984c26814646" kindref="member">$profileId</ref>,<sp/>array<sp/>$profileData)</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Basic<sp/>primitive<sp/>fields</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this-&gt;profileId<sp/>=<sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1ada45b82ed360c9200571984c26814646" kindref="member">$profileId</ref>;</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this-&gt;name<sp/>=<sp/>$profileData[</highlight><highlight class="stringliteral">&apos;name&apos;</highlight><highlight class="normal">];</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this-&gt;notes<sp/>=<sp/>$profileData[</highlight><highlight class="stringliteral">&apos;notes&apos;</highlight><highlight class="normal">];</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this-&gt;vendor<sp/>=<sp/>$profileData[</highlight><highlight class="stringliteral">&apos;vendor&apos;</highlight><highlight class="normal">];</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>More<sp/>complex<sp/>fields<sp/>that<sp/>are<sp/>not<sp/>currently<sp/>loaded<sp/>into<sp/>custom<sp/>objects</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this-&gt;features<sp/>=<sp/>$profileData[</highlight><highlight class="stringliteral">&apos;features&apos;</highlight><highlight class="normal">];</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this-&gt;colors<sp/>=<sp/>$profileData[</highlight><highlight class="stringliteral">&apos;colors&apos;</highlight><highlight class="normal">];</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this-&gt;fonts<sp/>=<sp/>$profileData[</highlight><highlight class="stringliteral">&apos;fonts&apos;</highlight><highlight class="normal">];</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this-&gt;media<sp/>=<sp/>$profileData[</highlight><highlight class="stringliteral">&apos;media&apos;</highlight><highlight class="normal">];</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>More<sp/>complex<sp/>fields<sp/>that<sp/>are<sp/>loaded<sp/>into<sp/>custom<sp/>objects</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this-&gt;codePages<sp/>=<sp/>[];</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this-&gt;codePageCacheKey<sp/>=<sp/>md5(json_encode($profileData[</highlight><highlight class="stringliteral">&apos;codePages&apos;</highlight><highlight class="normal">]));</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">foreach</highlight><highlight class="normal"><sp/>($profileData[</highlight><highlight class="stringliteral">&apos;codePages&apos;</highlight><highlight class="normal">]<sp/>as<sp/>$k<sp/>=&gt;<sp/>$v)<sp/>{</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this-&gt;codePages[$k]<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CodePage" kindref="compound">CodePage</ref>($v,<sp/>self::$encodings[$v]);</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="135"><highlight class="normal"></highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a20a29f0b598abacc67ce621274226a00" kindref="member">getCodePageCacheKey</ref>()</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1afcae275cdd9071e200189f7ac1935a2a" kindref="member">$this-&gt;codePageCacheKey</ref>;</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="144"><highlight class="normal"></highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1ab441e955c4e4070447712475e9ed8213" kindref="member">getCodePages</ref>()</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a997c0131facd5cc9105eb67dfb3436a9" kindref="member">$this-&gt;codePages</ref>;</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="153"><highlight class="normal"></highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1aacd0bf0f18eafc6d24f54af43340c799" kindref="member">getFeature</ref>($featureName)</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(isset($this-&gt;features[$featureName]))<sp/>{</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>$this-&gt;features[$featureName];</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$suggestionsArr<sp/>=<sp/>$this-&gt;<ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a03f6c78855683e897ffc90ebcf81f203" kindref="member">suggestFeatureName</ref>($featureName);</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$suggestionsStr<sp/>=<sp/>implode(</highlight><highlight class="stringliteral">&quot;,<sp/>&quot;</highlight><highlight class="normal">,<sp/>$suggestionsArr);</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$str<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;The<sp/>feature<sp/>&apos;$featureName&apos;<sp/>does<sp/>not<sp/>exist.<sp/>Try<sp/>one<sp/>that<sp/>does<sp/>exist,<sp/>such<sp/>as<sp/>$suggestionsStr&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/>new<sp/>\InvalidArgumentException($str);</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="172"><highlight class="normal"></highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1ad7114713c4fa2f0e9498b9ffedd6f33c" kindref="member">getId</ref>()</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1ada45b82ed360c9200571984c26814646" kindref="member">$this-&gt;profileId</ref>;</highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="181"><highlight class="normal"></highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1ac94d8ab5552c87867b9f5e4eb52be562" kindref="member">getName</ref>()</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a916ee28a3851967bf0e476c2b4a379c2" kindref="member">$this-&gt;name</ref>;</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="190"><highlight class="normal"></highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a4d1742270e38202b741047f26cafd4b3" kindref="member">getSupportsBarcodeB</ref>()</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>$this-&gt;<ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1aacd0bf0f18eafc6d24f54af43340c799" kindref="member">getFeature</ref>(</highlight><highlight class="stringliteral">&apos;barcodeB&apos;</highlight><highlight class="normal">)<sp/>===<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="199"><highlight class="normal"></highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1ad65127af04da844f69faecd0b841d7d0" kindref="member">getSupportsBitImageRaster</ref>()</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>$this-&gt;<ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1aacd0bf0f18eafc6d24f54af43340c799" kindref="member">getFeature</ref>(</highlight><highlight class="stringliteral">&apos;bitImageRaster&apos;</highlight><highlight class="normal">)<sp/>===<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="208"><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a05e0fd0a68d1ddcf30279db51cc338cd" kindref="member">getSupportsGraphics</ref>()</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>$this-&gt;<ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1aacd0bf0f18eafc6d24f54af43340c799" kindref="member">getFeature</ref>(</highlight><highlight class="stringliteral">&apos;graphics&apos;</highlight><highlight class="normal">)<sp/>===<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="217"><highlight class="normal"></highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a6e9e1db75bc1d859f316fd0fb6de2a09" kindref="member">getSupportsPdf417Code</ref>()</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO<sp/>submit<sp/>&apos;pdf417Code&apos;<sp/>as<sp/>a<sp/>new<sp/>feature<sp/>to<sp/>be<sp/>tracked<sp/>in<sp/>upstream<sp/>profiles</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>$this-&gt;<ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1aacd0bf0f18eafc6d24f54af43340c799" kindref="member">getFeature</ref>(</highlight><highlight class="stringliteral">&apos;qrCode&apos;</highlight><highlight class="normal">)<sp/>===<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="227"><highlight class="normal"></highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a68f2e327e06661e60e2bb0d8d320fb4e" kindref="member">getSupportsQrCode</ref>()</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>$this-&gt;<ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1aacd0bf0f18eafc6d24f54af43340c799" kindref="member">getFeature</ref>(</highlight><highlight class="stringliteral">&apos;qrCode&apos;</highlight><highlight class="normal">)<sp/>===<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="236"><highlight class="normal"></highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a919de3b3566a13c73688c24ebe3bd2a5" kindref="member">getSupportsStarCommands</ref>()</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>$this-&gt;<ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1aacd0bf0f18eafc6d24f54af43340c799" kindref="member">getFeature</ref>(</highlight><highlight class="stringliteral">&apos;starCommands&apos;</highlight><highlight class="normal">)<sp/>===<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="245"><highlight class="normal"></highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a72fa7a5d921f9e27e1310662337f05e5" kindref="member">getVendor</ref>()</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1ae014cd205147bd6aa37f080d35922a09" kindref="member">$this-&gt;vendor</ref>;</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="254"><highlight class="normal"></highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a03f6c78855683e897ffc90ebcf81f203" kindref="member">suggestFeatureName</ref>($featureName)</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>self::suggestNearest($featureName,<sp/>array_keys($this-&gt;features),<sp/>3);</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="265"><highlight class="normal"></highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1af80b66af5684a39f6616521ce817f245" kindref="member">getProfileNames</ref>()</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>self::loadCapabilitiesDataFile();</highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>array_keys(self::$profiles);</highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="275"><highlight class="normal"></highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1a6df70056fefa1d4ae683caca6584ef34" kindref="member">load</ref>($profileName)</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>self::loadCapabilitiesDataFile();</highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<sp/>isset(self::$profiles[$profileName]))<sp/>{</highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$suggestionsArray<sp/>=<sp/>self::suggestProfileName($profileName);</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$suggestionsStr<sp/>=<sp/>implode(</highlight><highlight class="stringliteral">&quot;,<sp/>&quot;</highlight><highlight class="normal">,<sp/>$suggestionsArray);</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="namespaceInvalidArgumentException" kindref="compound">InvalidArgumentException</ref>(</highlight><highlight class="stringliteral">&quot;The<sp/>CapabilityProfile<sp/>&apos;$profileName&apos;<sp/>does<sp/>not<sp/>exist.<sp/>Try<sp/>one<sp/>that<sp/>does<sp/>exist,<sp/>such<sp/>as<sp/>$suggestionsStr.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile" kindref="compound">CapabilityProfile</ref>($profileName,<sp/>self::$profiles[$profileName]);</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="294"><highlight class="normal"></highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1adf81204aee4d76a44950adbeb7b115f0" kindref="member">loadCapabilitiesDataFile</ref>()</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(self::$profiles<sp/>===<sp/>null)<sp/>{</highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$filename<sp/>=<sp/>dirname(__FILE__)<sp/>.<sp/></highlight><highlight class="stringliteral">&quot;/resources/capabilities.json&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$capabilitiesData<sp/>=<sp/>json_decode(file_get_contents($filename),<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>self::$profiles<sp/>=<sp/>$capabilitiesData[</highlight><highlight class="stringliteral">&apos;profiles&apos;</highlight><highlight class="normal">];</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>self::$encodings<sp/>=<sp/>$capabilitiesData[</highlight><highlight class="stringliteral">&apos;encodings&apos;</highlight><highlight class="normal">];</highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="307"><highlight class="normal"></highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1aade461e670cdf1e3e382df223dec8c87" kindref="member">suggestNearest</ref>($input,<sp/>array<sp/>$choices,<sp/>$num)</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$distances<sp/>=<sp/>array_fill_keys($choices,<sp/>PHP_INT_MAX);</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">foreach</highlight><highlight class="normal"><sp/>($distances<sp/>as<sp/>$word<sp/>=&gt;<sp/>$_)<sp/>{</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$distances[$word]<sp/>=<sp/>levenshtein($input,<sp/>$word);</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>asort($distances);</highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>array_slice(array_keys($distances),<sp/>0,<sp/>min($num,<sp/>count($choices)));</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="327"><highlight class="normal"></highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1CapabilityProfile_1af2a85dca96a96871eaca4e27a19ba4f5" kindref="member">suggestProfileName</ref>($profileName)</highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$suggestions<sp/>=<sp/>self::suggestNearest($profileName,<sp/>array_keys(self::$profiles),<sp/>3);</highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$alwaysSuggest<sp/>=<sp/>[</highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&apos;simple&apos;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&apos;default&apos;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>];</highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">foreach</highlight><highlight class="normal"><sp/>($alwaysSuggest<sp/>as<sp/>$item)<sp/>{</highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(array_search($item,<sp/>$suggestions)<sp/>===<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>array_push($suggestions,<sp/>$item);</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="346"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>$suggestions;</highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="348"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="C:/www/aplusnet/incahellas.com/public_html/lib/escpos-php-development/src/Mike42/Escpos/CapabilityProfile.php"/>
  </compounddef>
</doxygen>
