Base modifications
Comprises part of the changes in #142
- Add additions to current base files (e.g. BaseApiConnector, BaseDocuments, BaseMapper)
- Other small modifications that have no effect on existing functionality
BaseApiConnector
- Adds getConnection function which is used to call other ApiConnectors from within an ApiConnector
- Adds convertOptionsToArrayOfString function to convert a simple $options array to a Twinfield acceptable ArrayOfString when using the Finder
- Adds mapListAll function to allow easy mapping of listAll results to objects
BaseDocument
- Extends CreateNodeWithTextContent function to optionally add attributes to a node
BaseMapper
- Extends getField function to optionally allow checking for (error) messages on the field
- Adds getAttribute function to read attributes of a node
- Adds parse functions for Boolean, Date, DateTime, Enum Money and Object fields
Read
- Adds some child functionality to Read, so these common functions can later be removed from the children
OpenIdConnectAuthentication
- Extends __construct function with the optional ability to connect using a known access token and access cluster for quicker connections
BaseService
- Modification to switch WSDL from __call to __soapcall because of deprecation of the former (see comments in #142)
Other
- Removal of unnecessary whitespaces and typos
@willemstuursma Moving along quite nicely. Thanks for all the reviewing!
@willemstuursma Do you have any unsolved requests concerning the current PR?
If not, I would like to continue with the next part of #142
Sorry @iranl, I noticed some changes but it is really super busy in my day job, so I didn't have time to do any further reviewing yet.
@willemstuursma no problem. Just thought I'd check you weren't waiting on more changes from me. Will continue the conversation when you have the time.
@willemstuursma I see you're actively reviewing PR's again. Will you be able to help this PR along? I am still willing and able to break up #142 as previously agreed.
Hi,
I'm new to this package, running into the access token issue where it's logging in for each request while I already have a valid token, which results in quite some additional requests.
I could help you with the access token part, although it would be breaking for current implementations, we could use AccessTokenInterface to pass the access + refresh token + expires to let this package check if it's valid and requesting a new access token when it's invalid. Or use a setter for it,
Or possible add a tokenRefresh callback method to call when token is refreshed so it can be stored externally. Because there's no way to get the access token from the current connection.
Don't mean to barge in, but would love have this feature :) and can get some time from my company to help with this.
Cheers, Eric