|
Odyssey
|
Public Member Functions | |
| __construct () | |
| VendorByCuReport () | |
| IsDownload () | |
| isSuccessResult ($result) | |
| set ($prop, $value) | |
Protected Member Functions | |
| InitDownloadFlag () | |
| DownloadCsv ($content) | |
| GetMasterData () | |
| GetTvClients () | |
| GetCuLocalData () | |
| LocalDataSql () | |
| GetExternalTrustedData ($server, $ids) | |
| setCurlCookies ($server) | |
| MergeClientsToCuData ($server, $external_data) | |
| isRealServer ($server, $cu) | |
| CuExistsInData ($cu) | |
| VendorExistsInData ($cu, $vendor) | |
| OutputReportHeader () | |
| CsvHeader () | |
| HtmlHeader () | |
| OutputReportBody () | |
| CsvBody () | |
| OutputCsvDataRow ($cu) | |
| setCsvCellContent ($vendor_id, $cu) | |
| HtmlBody () | |
| OutputHtmlDataRow ($cu, $toggle) | |
| GetCuEditLink ($cu) | |
| SetServerProtocol () | |
| SetCellAttributes ($cu, $vendor_id) | |
| OutputReportFooter () | |
Class VendorByCu Copyright 07/2019 HomeCu LLC
Outputs a basic report showing what vendors are used by which credit unions. Aid in migration tool.
Usage:
$obj = new VendorByCu(); echo $obj ->set('dbh', $dbh) ->set('SYS_TYPE_UPG_TEST', $SYS_TYPE_UPG_TEST) ->set('SYS_TYPE_CLOSED', $SYS_TYPE_CLOSED) ->VendorByCuReport();
Odyssey uses Google Oauth. TO TEST LOCALLY get your my.homecu.net auth cookie and in your code that calls this class add
->set('dev_oauth', 'your homecu_dev_oauth2_proxy cookie value')
. . . or all your my.homecu.net CU's will show no trusted vendors.
| object | $dbh | database resource |
| int | $SYS_TYPE_UPG_TEST | |
| int | $SYS_TYPE_CLOSED |
Definition at line 31 of file VendorByCu.i.
| VendorByCu::__construct | ( | ) |
All we're doing in the constructor is setting the download property if it exists in $_GET.
| Exception |
Definition at line 77 of file VendorByCu.i.
|
protected |
|
protected |
Helper for OutputReportHeader(), prepare the text header for download.
Definition at line 395 of file VendorByCu.i.
|
protected |
Helper for MergeClientsToCuData(). Does this CU exist in $this->cu_data? @TODO Hmm, might we need to use this to create a new node?
| string | $cu |
Definition at line 357 of file VendorByCu.i.
|
protected |
Output the data for download.
| $content |
Definition at line 134 of file VendorByCu.i.
|
protected |
Set a link from the HTML display to CU info.
| string | $cu |
Definition at line 554 of file VendorByCu.i.
|
protected |
Get the CU data from info; we need the CU Id from cuadmin and and the trusted vendor data from cu trusted vendors. Join admin and vendors on info to get all CU's.
| Exception |
Definition at line 189 of file VendorByCu.i.
|
protected |
Using the array of trusted ID's, query a server for the associated CU's.
| string | $server | |
| array | $ids |
Definition at line 240 of file VendorByCu.i.
|
protected |
Get the master data record. any DB query, count excepted, should always be an array.
| Exception |
Definition at line 149 of file VendorByCu.i.
|
protected |
Query each of $this->external_servers at the CuVendorListApi.prg URL for which T.V.'s are associated with which CU's. Set into the existing trusted vendors array.
Definition at line 170 of file VendorByCu.i.
|
protected |
Helper for OutputReportBody(), return the body for HTML output.
Definition at line 508 of file VendorByCu.i.
|
protected |
Helper for OutputReportHeader(), prepare the HTML output header.
Definition at line 410 of file VendorByCu.i.
|
protected |
If they've clicked download, set the flag.
Definition at line 120 of file VendorByCu.i.
| VendorByCu::IsDownload | ( | ) |
Because of this tightly coupled system that mixes logic and output, we need a pubic method to avoid HTML being printed if we are trying to download.
Definition at line 111 of file VendorByCu.i.
|
protected |
When querying external servers, there may be old implementations of the current CU. The local record will always tell us what the real server is. Use to ignore others.
| string | $server | |
| string | $cu |
Definition at line 323 of file VendorByCu.i.
| VendorByCu::isSuccessResult | ( | $result | ) |
Helper for MergeClientsToCuData(), make sure the array members we need are all present.
| array | $result |
Definition at line 341 of file VendorByCu.i.
|
protected |
Helper for GetCuLocalData().
Definition at line 216 of file VendorByCu.i.
|
protected |
What it says, merge external server results into $this->cu_data.
| string | $server | |
| array | $external_data |
Definition at line 290 of file VendorByCu.i.
|
protected |
Output a row of data for download.
| string | $cu |
Definition at line 470 of file VendorByCu.i.
|
protected |
Output a row of data from tr to /tr.
| string | $cu | |
| string | $toggle | even|odd |
Definition at line 528 of file VendorByCu.i.
|
protected |
Output the body HTML.
| Exception |
Definition at line 445 of file VendorByCu.i.
|
protected |
Simple single responsibility or, do we want footer data and row here?
Definition at line 608 of file VendorByCu.i.
|
protected |
Walk the trusted vendors and output the report head.
Definition at line 386 of file VendorByCu.i.
| VendorByCu::set | ( | $prop, | |
| $value | |||
| ) |
Typical setter
| string | $prop | |
| mixed | $value |
Definition at line 633 of file VendorByCu.i.
|
protected |
Helper for outputDataRow.
| string | $cu | |
| string | $vendor_id |
Definition at line 590 of file VendorByCu.i.
|
protected |
Helper for OutputCsvDataRow(), make the cell content.
| string | $vendor_id | |
| string | $cu |
Definition at line 491 of file VendorByCu.i.
|
protected |
Allows a dev cookie to test locally via the setter, see comments at head.
| string | $server |
Definition at line 264 of file VendorByCu.i.
|
protected |
Going to try this without HB_ENV. If it causes problems, we'll inject it.
Definition at line 572 of file VendorByCu.i.
| VendorByCu::VendorByCuReport | ( | ) |
Entry point.
| Exception |
Definition at line 87 of file VendorByCu.i.
|
protected |
Helper for MergeClientsToCuData(). Vendor already in the cu_data array? The external query may return duplicates, and we've already ensured the cu_data trustedid member is an array.
| string | $cu | |
| string | $vendor |
Definition at line 370 of file VendorByCu.i.
1.8.15