private function convertDbToApi($db)
    {
        $result = new AResponse();
        if ($db) {
            /* extract DB data */
            $custId = $db[QBGetCustomer::A_ID];
            $email = $db[QBGetCustomer::A_EMAIL];
            $nameFirst = $db[QBGetCustomer::A_NAME_FIRST];
            $nameLast = $db[QBGetCustomer::A_NAME_LAST];
            $mlmId = $db[QBGetCustomer::A_MLM_ID];
            $path = $db[QBGetCustomer::A_PATH];
            $country = $db[QBGetCustomer::A_COUNTRY];

            /* prepare response data */
            $pathFull = $path . $custId . Cfg::DTPS;

            /* compose response data */
            $result->setId($custId);
            $result->setEmail($email);
            $result->setNameFirst($nameFirst);
            $result->setNameLast($nameLast);
            $result->setMlmId($mlmId);
            $result->setCountry($country);
            $result->setPathFull($pathFull);
        }
        return $result;
    }
private function convertDbToApi($db)
    {
        $result = new AResponse();
        if ($db) {
            /* extract DB data */
            $custId = $db[QBGetCustomer::A_ID];
            $email = $db[QBGetCustomer::A_EMAIL];
            $nameFirst = $db[QBGetCustomer::A_NAME_FIRST];
            $nameLast = $db[QBGetCustomer::A_NAME_LAST];
            $mlmId = $db[QBGetCustomer::A_MLM_ID];
            $path = $db[QBGetCustomer::A_PATH];
            $country = $db[QBGetCustomer::A_COUNTRY];

            /* prepare response data */
            $pathFull = $path . $custId . Cfg::DTPS;

            /* compose response data */
            $result->setId($custId);
            $result->setEmail($email);
            $result->setNameFirst($nameFirst);
            $result->setNameLast($nameLast);
            $result->setMlmId($mlmId);
            $result->setCountry($country);
            $result->setPathFull($pathFull);
        }
        return $result;
    }
private function convertDbToApi ( $ db ) { $ result = new AResponse ( ) ; if ( $ db ) { /* extract DB data */ $ custId = $ db [ QBGetCustomer :: A_ID ] ; $ email = $ db [ QBGetCustomer :: A_EMAIL ] ; $ nameFirst = $ db [ QBGetCustomer :: A_NAME_FIRST ] ; $ nameLast = $ db [ QBGetCustomer :: A_NAME_LAST ] ; $ mlmId = $ db [ QBGetCustomer :: A_MLM_ID ] ; $ path = $ db [ QBGetCustomer :: A_PATH ] ; $ country = $ db [ QBGetCustomer :: A_COUNTRY ] ; /* prepare response data */ $ pathFull = $ path . $ custId . Cfg :: DTPS ; /* compose response data */ $ result -> setId ( $ custId ) ; $ result -> setEmail ( $ email ) ; $ result -> setNameFirst ( $ nameFirst ) ; $ result -> setNameLast ( $ nameLast ) ; $ result -> setMlmId ( $ mlmId ) ; $ result -> setCountry ( $ country ) ; $ result -> setPathFull ( $ pathFull ) ; } return $ result ; }
Convert database query result set to response object.

@param array $db
@return \Praxigento\Downline\Api\Service\Customer\Get\ById\Response
@throws \Exception
Convert database query result set to response object .