twinfield icon indicating copy to clipboard operation
twinfield copied to clipboard

Base modifications

Open iranl opened this issue 6 years ago • 6 comments

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

iranl avatar Jun 10 '19 15:06 iranl

@willemstuursma Moving along quite nicely. Thanks for all the reviewing!

iranl avatar Jun 11 '19 11:06 iranl

@willemstuursma Do you have any unsolved requests concerning the current PR?

If not, I would like to continue with the next part of #142

iranl avatar Jun 27 '19 11:06 iranl

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 avatar Jun 28 '19 12:06 willemstuursma

@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.

iranl avatar Jun 28 '19 19:06 iranl

@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.

iranl avatar Aug 22 '19 10:08 iranl

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

ericclaeren avatar Dec 21 '22 10:12 ericclaeren