Updates to Sample Docs

This commit is contained in:
Travis
2016-07-15 20:00:15 +00:00
parent 63fa5b73a8
commit a27d222885
88 changed files with 88 additions and 88 deletions

View File

@@ -18,4 +18,4 @@ This will save the image as /samples/invoice/images/sample.png</p></div></div><d
}</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY</p></div></div><div class="code"><div class="wrapper"> ResultPrinter::printResult(<span class="hljs-string">"Retrieved QR Code for Invoice"</span>, <span class="hljs-string">"Invoice"</span>, <span class="hljs-variable">$invoice</span>-&gt;getId(), <span class="hljs-keyword">null</span>, <span class="hljs-variable">$image</span>);</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="show-the-image">Show the Image</h3>
<p>In PHP, there are many ways to present an images.
One of the ways, you could directly inject the base64-encoded string
with proper image information in front of it.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">echo</span> <span class="hljs-string">'&lt;img src="data:image/png;base64,'</span>. <span class="hljs-variable">$image</span>-&gt;getImage() . <span class="hljs-string">'" alt="Invoice QR Code" /&gt;'</span>;</div></div></div></div></body></html>
with proper image information in front of it.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">echo</span> <span class="hljs-string">'&lt;img src="data:image/png;base64,'</span>. <span class="hljs-variable">$image</span>-&gt;getImage() . <span class="hljs-string">'" alt="Invoice QR Code" /&gt;'</span>;</div></div></div></div></body></html>