PHP code example of ksfraser / ksf-fa-common

1. Go to this page and download the library: Download ksfraser/ksf-fa-common library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ksfraser / ksf-fa-common example snippets


use ksfraser\FrontAccounting\Common\ContactResolver\ContactResolver;

$resolver = new ContactResolver();          // FA runtime (native functions)

$person    = $resolver->findById(7);                       // one person
$byEmail   = $resolver->findByEmail('[email protected]');      // every match
$customers = $resolver->findByCustomer('CUST-1');          // a debtor's contacts
$entity    = $resolver->findByEntity('cust_branch', 'BR-9');
$contact   = $resolver->findContactById(21);               // one relation
$categories = $resolver->listContactCategoryIds(7);        // category ids
$hits      = $resolver->search('alice', 20);               // name/email/phone