PHP-библиотека Consolibyte QuickBooks — как вы передаете параметры функциям, поставленным в очередь?

Я хочу добавить клиента в свою установку QB, используя PHP-библиотеку Consolibyte. Я знаю, что мне нужно инициализировать и поставить в очередь мои запросы, используя следующее:

$Queue = new QuickBooks_WebConnector_Queue('mysql://root:password@localhost/my_database');  
$Queue->enqueue(QUICKBOOKS_ADD_CUSTOMER, $id_value);

В приведенном выше примере я просто передаю уникальный идентификатор, когда ставлю запрос в очередь ($id_value). Глядя на метод _quickbooks_customer_add_request(), я вижу, что у функции есть 9 параметров. Как устанавливаются эти параметры, когда я вызываю $Queue->enqueue()?


person Lloyd Banks    schedule 19.06.2019    source источник


Ответы (1)


Вот определение функции:

->enqueue($action, $ident = null, $priority = 0, $extra = null, $user = null, $qbxml = null, $replace = true)

Отсюда:

Документация:

* @param string $action     An action to be performed within QuickBooks (see the qbXML and QuickBooks SDK documentation, i.e.: "CustomerAdd", "InvoiceAdd", "CustomerMod", etc.)
* @param mixed $ident           A unique identifier (if required) for a record being operated on (i.e. if you're doing a "CustomerAdd", you'd probaly put a unique customer ID number here, so you're SOAP handler function knows which customer it is supposed to add)
* @param integer $priority      The priority of the update (higher priority actions will be pushed to QuickBooks before lower priority actions)
* @param array $extra           If you need to make additional bits of data available to your request/response functions, you can pass an array of extra data here
* @param string $user           The username of the QuickBooks Web Connector user this item should be queued for 
* @param boolean $replace       Whether or not to replace any other currently queued entries with the same action/ident
person Keith Palmer Jr.    schedule 19.06.2019