Esempio n. 1
0
 /**
  * Map a QuickBooks ListID or TxnID to an application primary key
  * 
  * @param string $type					The type of object
  * @param string $ListID_or_TxnID		The ListID or TxnID of the object within QuickBooks
  * @return string						The application record primary key
  */
 protected function _mapToApplicationID($type, $ListID_or_TxnID)
 {
     $extra = null;
     if (strlen($this->_config['map_to_application_handler'])) {
         $func = $this->_config['map_to_application_handler'];
         if (false === strpos($func, '::')) {
             return $func($type, $ListID_or_TxnID);
         } else {
             $tmp = explode('::', $func);
             return call_user_func(array($tmp[0], $tmp[1]), $type, $ListID_or_TxnID);
         }
     } else {
         if ($ID = $this->_driver->identToApplication($this->_user, $type, $ListID_or_TxnID, $extra)) {
             // //else if ($ID = $this->fetchApplicationID($type, $ListID_or_TxnID))
             return $ID;
         }
     }
     return null;
 }