<?php

namespace App\Controllers;

class AirFlow extends BaseController
{

    public function flowNewAccount(){

        $raw_json = file_get_contents('php://input');
        $in = json_decode($raw_json, true);
        $out =[];
        $this->processLoadData();
        log_message('critical', "AirFlow::flowNewAccount ********* ALL   ".serialize($in) );
        return  []; //json_encode( $final_out );
    }

    private function processLoadData(){
        $mysql  ="SELECT uid,customer_uid,loan_detail 
                  FROM applications 
                  WHERE pc = 0 limit 2";

        $query = $this->db->query($mysql);
        $row   = $query->getRowArray();

        foreach ($row as $rw){
            log_message('critical', "AirFlow::processLoadData ********* ALL 0000  ". $rw[0]["customer_uid"] );
            log_message('critical', "AirFlow::processLoadData ********* ALL   ". $rw["customer_uid"] );

        }

        return 0;
    }

}