Hello group, I was wondering what your policy is towards changing PHP's public interface in order to accomodate new features.
I'm looking into extending the PHP InterBase extension to support multi-database (2-phase committed) transactions. This would result in the following implications: - a transaction handle no longer uniquely identifies a link handle -> internal data structures will have to be changed a little, not a real problem - a query against a multi-DB transaction would have to know both the link and transaction handle -> this is more of a problem, because the functions ibase_query() and ibase_prepare() expect a 'link_trans' argument, which is either a le_[p]link or a le_trans, and not both. Therefore, in order to accomodate this, I would like to suggest making the following (backward compatible) change to the interface into : ibase_query([ [int link_identifier [, int trans_identifier]], string query [, int bind_args]]) ibase_prepare([ [int link_identifier [, int trans_identifier]], string query]) The Zend argument type inference system should then distinguish between the cases where both a db & trans handle are passed, only one of these handles is passed or neither. This would allow existing code to continue working unchanged. A further extension could be to allow different transaction parameters for each link the transaction connects to. (Example: transaction connects to db1 R/W and to db2 R/O simultaneously) This would require changing the interface of ibase_trans() to int ibase_trans ( [int trans_args [, int link_identifier]] | [int trans_args, int link_identifier] *]) which is again a backward compatible change, because formally, the function only accepts two parameters currently. However, the existing code does accept multiple le_[p]link arguments, but ignores them. The application I'm going to use this for does not require the latter, so my main concern is the first part of the modification. Ard Biesheuvel a.k.biesheuvel <at/> its.tudelft.nl -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php