Next revision | Previous revisionNext revisionBoth sides next revision |
rfc:ldap_modify_batch [2013/03/01 00:39] – created ondrahosek | rfc:ldap_modify_batch [2014/01/02 13:11] – fix voting ondrahosek |
---|
* Date: 2013-03-01 | * Date: 2013-03-01 |
* Author: Ondřej Hošek, ondra.hosek@gmail.com | * Author: Ondřej Hošek, ondra.hosek@gmail.com |
* Status: Draft | * Status: Voting (until 2014-01-16) |
* First Published at: http://wiki.php.net/rfc/ldap_modify_batch | * First Published at: http://wiki.php.net/rfc/ldap_modify_batch |
| |
"modtype" => LDAP_MODIFY_BATCH_ADD, | "modtype" => LDAP_MODIFY_BATCH_ADD, |
"values" => array( | "values" => array( |
"jack.smith@example.com", | "jack.smith@example.com", |
"jack.smith-jones@example.com" | "jack.smith-jones@example.com" |
) | ) |
) | ) |
(The author would like further feedback on the following facets of the proposal and implementation -- if you deem any of them problematic, please move them into the //Open Issues// section and start a lively discussion.) | (The author would like further feedback on the following facets of the proposal and implementation -- if you deem any of them problematic, please move them into the //Open Issues// section and start a lively discussion.) |
| |
* The structure of ''$modifications'' (specifically the array-of-arrays-of-arrays structure and the usage of the special key strings ''"attrib"'', ''"modtype"'' and ''"values"'') might not be the optimal representation of a list of modifications. | * The structure of ''$modifications'' (specifically the array-of-arrays-of-arrays structure and the usage of the special key strings ''"attrib"'', ''"modtype"'' and ''"values"'') might not be the optimal representation of a list of modifications. |
| |
* The types are currently rather inflexible. The value that ''"attrib"'' maps to must be a string, and the value that ''"values"'' maps to must be an array of strings. Adding automatic type conversion will make the API more programmer-friendly; keeping things strict, on the other hand, forces programmers to think twice about the format they will (must?) use to transmit the values. | * The types are currently rather inflexible. The value that ''"attrib"'' maps to must be a string, and the value that ''"values"'' maps to must be an array of strings. Adding automatic type conversion will make the API more programmer-friendly; keeping things strict, on the other hand, forces programmers to think twice about the format they will (must?) use to transmit the values. |
| |
* The function is implemented in a way that first validates all argument values and only then re-formats them into what is expected by the underlying C API. This approach was chosen to make cleanup easier (nothing is allocated until everything has been validated, so there is only one deallocation code path), but it does come with a slight performance penalty (each array must be iterated through twice). | * The function is implemented in a way that first validates all argument values and only then re-formats them into what is expected by the underlying C API. This approach was chosen to make cleanup easier (nothing is allocated until everything has been validated, so there is only one deallocation code path), but it does come with a slight performance penalty (each array must be iterated through twice). |
| |
* The included utility functions might be duplicates of existing ones. These functions are ''_ldap_str_equal_to_const'', ''_ldap_strlen_max'' and ''_ldap_hash_fetch''. | * The included utility functions might be duplicates of existing ones. These functions are ''_ldap_str_equal_to_const'', ''_ldap_strlen_max'' and ''_ldap_hash_fetch''. |
| |
===== Open Issues ===== | ===== Open Issues ===== |
===== Mailing list discussion ===== | ===== Mailing list discussion ===== |
| |
The mailing list discussion is available [[http://marc.info/?t=136205984800001|on MARC]]. | The mailing list discussion is available on MARC: [[http://marc.info/?t=136205984800001|initial discussion]] · [[http://marc.info/?l=php-internals&m=138672150308377|RFC publication]] · [[http://marc.info/?t=138767449000001|feedback?]] · [[http://marc.info/?l=php-internals&m=138865424003061|voting opened]] |
| |
| ===== Vote ===== |
| |
| <doodle |
| title="ldap_modify_batch" auth="ondrahosek" voteType="single" closed="false"> |
| * Yes |
| * No |
| </doodle> |
| |
| Voting ends on January 16th, 2014 (unless it is aborted due to a change request). |
| |
===== Changelog ===== | ===== Changelog ===== |
| |
* 1.0 (2013-03-01): Initial draft, following [[http://marc.info/?l=php-internals&m=136205976813706|mailing list post]]. | * 1.0 (2013-03-01): Initial draft, following [[http://marc.info/?l=php-internals&m=136205976813706|mailing list post]]. |
| |