Took me sometime to respond as I'm travelling and haven't had time to answer all my mails.
At 08:25 PM 4/11/2005 +0200, Marcus Boerger wrote:
Hello Andi,
Monday, April 11, 2005, 12:35:34 AM, you wrote:
> Hi,
> Andrey might have a point. Unlike the other names you've defined, this one > feels as if it'll break lots of apps. > How about FileIterator?
very missleading. Maybe FileObject or FileInstance or whatever to habe something longer but then again many scripts will fail for the same reason. And i tempt to think many people implementing such a class might have avoided the name 'File' to differentiate from function 'File' (which is one of the reasons i chose the short name).
regards marcus
> Andi
> At 05:43 AM 4/5/2005 -0400, Marcus Boerger wrote:
>>Hello Andrey,
>>
>> this happens with any other class/interface we define also. And we've
>>discussed that before. The result was that we use the names in c we want
>>and try to do the best common implementation possible to keep everybody
>>as happy as possible.
>>
>>Unfortunatley we couldn't add namespaces to php....
>>
>>marcus
>>
>>Tuesday, April 5, 2005, 5:30:22 AM, you wrote:
>>
>> > Marcus,
>> > isn't this going to blow up existing applications that define class File ?
>>
>> > Andrey
>>
>> > Marcus Boerger wrote:
>> >> helly Tue Apr 5 05:24:53 2005 EDT
>> >>
>> >> Modified files:
>> >> /php-src/ext/spl php_spl.c
>> >> Log:
>> >> - Register class File
>> >> - Remove superflous ;
>> >> - Stop spl_autoloading on pending exception
>> >>
>> >>
>> >>
>> http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.44&r2=1.45&ty=u
>> >> Index: php-src/ext/spl/php_spl.c
>> >> diff -u php-src/ext/spl/php_spl.c:1.44 php-src/ext/spl/php_spl.c:1.45
>> >> --- php-src/ext/spl/php_spl.c:1.44 Thu Mar 31 12:17:38 2005
>> >> +++ php-src/ext/spl/php_spl.c Tue Apr 5 05:24:53 2005
>> >> @@ -16,7 +16,7 @@
>> >>
>> >>
>> +----------------------------------------------------------------------+
>> >> */
>> >>
>> >> -/* $Id: php_spl.c,v 1.44 2005/03/31 17:17:38 helly Exp $ */
>> >> +/* $Id: php_spl.c,v 1.45 2005/04/05 09:24:53 helly Exp $ */
>> >>
>> >> #ifdef HAVE_CONFIG_H
>> >> #include "config.h"
>> >> @@ -106,6 +106,7 @@
>> >> SPL_ADD_CLASS(DirectoryIterator, z_list, sub, allow, ce_flags); \
>> >> SPL_ADD_CLASS(DomainException, z_list, sub, allow, ce_flags); \
>> >> SPL_ADD_CLASS(EmptyIterator, z_list, sub, allow, ce_flags); \
>> >> + SPL_ADD_CLASS(File, z_list, sub, allow, ce_flags); \
>> >> SPL_ADD_CLASS(FilterIterator, z_list, sub, allow, ce_flags); \
>> >> SPL_ADD_CLASS(InfiniteIterator, z_list, sub, allow, ce_flags); \
>> >> SPL_ADD_CLASS(InvalidArgumentException, z_list, sub, allow,
>> ce_flags); \
>> >> @@ -148,9 +149,7 @@
>> >> zend_file_handle file_handle;
>> >> zend_op_array *new_op_array;
>> >> zval *result = NULL;
>> >> -
>> >> - ;
>> >> -
>> >> +
>> >> class_file_len = spprintf(&class_file, 0, "%s%s", lc_name,
>> file_extension);
>> >>
>> >> if (zend_stream_open(class_file, &file_handle TSRMLS_CC) ==
>> SUCCESS) {
>> >> @@ -281,7 +280,7 @@
>> >> if (SPL_G(autoload_functions)) {
>> >> lc_name = zend_str_tolower_dup(Z_STRVAL_PP(class_name),
>> Z_STRLEN_PP(class_name));
>> >>
>> >> zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions),
>> >> &function_pos);
>> >> -
>> >> while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions),
>> >> &function_pos) == SUCCESS) {
>> >> +
>> >> while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions),
>> >> &function_pos) == SUCCESS && !EG(exception)) {
>> >>
>> >> zend_hash_get_current_key_ex(SPL_G(autoload_functions), &func_name,
>> >> &func_name_len, &dummy, 0, &function_pos);
>> >>
>> >> zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **)
>> >> &func_ptr_ptr, &function_pos);
>> >> zend_call_method(NULL, NULL, func_ptr_ptr,
>> >> func_name, func_name_len, &retval, 1, *class_name, NULL TSRMLS_CC);
>> >>
>>
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php