Skip to content

Instantly share code, notes, and snippets.

View jonathanmaron's full-sized avatar

Jonathan Maron jonathanmaron

View GitHub Profile
<?php
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
$templateFilename = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'sample_invoice.tx';
string(55) "sample_invoice.tx was written to /tmp/sample_invoice.tx"
<?php
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
$templateName = 'sample_invoice.tx';
<?php
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
var_dump($reportingCloud->getTemplatePageCount('sample_invoice.tx'));
<?php
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
var_dump($reportingCloud->templateExists('sample_invoice.tx'));
<?php
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
var_dump($reportingCloud->getTemplateCount());
string(59) "sample_invoice.tx was written to /tmp/sample_invoice_p0.png"