zendtech / IbmiToolkit

PHP frontend to XMLSERVICE for IBM i development.
BSD 3-Clause "New" or "Revised" License
46 stars 34 forks source link

Refactor for a single common transport class #76

Open alanseiden opened 8 years ago

alanseiden commented 8 years ago

Would benefit from a common transport class for new transports to inherit from. Currently a kludge. Make it easier to add new transports.

alanseiden commented 8 years ago

Would help when we add new transports such as direct call and PDO.

alanseiden commented 8 years ago

If using existing transport logic as a starting point, refactor to eliminate setIsPersistent() from ToolkitService class. Not all transports have a concept of “persistence.” HTTP and future PECL transports don't have it. Errors can occur when attempting a close/disconnect on these transports if the setIsPersistent method is used, so extra code is needed to check for these "exception" transports. In general, the toolkit has a bias toward database transports (db2 and odbc). Try to make the toolkit more transport-neutral.