Changeset 278 for trunk

Show
Ignore:
Timestamp:
10/05/2007 05:04:14 (14 months ago)
Author:
indeyets
Message:

changed explicit type of DateTime? class to be php:DateTime

Location:
trunk/ext/php
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/ext/php/CHANGELOG

    r277 r278  
    44  status: beta 
    55  changes: 
    6     - short-and-flat arrays are dumped using inline-mode now (for readability) 
    76    - gcc-2.95 compatibility (patch by Brian J. France) 
    87    - fixed dumping of mixed arrays and numeric-arrays starting from non-zero digit 
     8    - fixed loading of maps with numeric keys 
     9    - short-and-flat arrays are dumped using inline-mode now (for readability) 
    910    - added support for loading explicitly typed DateTime (with timestamp-compatible value) 
    10     - fixed loading of maps with numeric keys 
    1111    - added support for loading sequences into classes which implement ArrayAccess (!php/array:ClassName) 
    1212    - added support for loading maps into classes which implement ArrayAccess (!php/hash:ClassName) 
    1313    - added support for loading classes which implement Serializable (!php:ClassName) 
     14    - changed explicit type of DateTime class to be !php:DateTime 
    1415 
    1516- version: 0.9.1 
  • trunk/ext/php/phpext.c

    r277 r278  
    360360                        } else if (strcmp(n->type_id, "float#neginf") == 0) { 
    361361                                ZVAL_DOUBLE(o, -inf()); 
    362                         } else if (strncmp(n->type_id, "timestamp", 9) == 0 || strcmp(n->type_id, "php:YAML::Datetime") == 0) { 
     362                        } else if (strncmp(n->type_id, "timestamp", 9) == 0 || strcmp(n->type_id, "php:Datetime") == 0) { 
    363363                                zval fname, param, *params[1]; 
    364364                                TSRMLS_FETCH(); 
     
    374374                                zval_dtor(params[0]); 
    375375                        } else if (strncmp(n->type_id, "php:", 4) == 0) { 
     376                                /* Some custom php-class packed in a string. Only ones implementing Serializable ar supported */ 
    376377                                size_t classname_len = strlen(n->type_id) - 4; 
    377378                                char *classname = emalloc(classname_len + 1); 
  • trunk/ext/php/phpunit-tests/TestLoad.php

    r277 r278  
    165165 
    166166        // explicit 
    167         $this->assertType('DateTime', syck_load("!php:YAML::Datetime 2002-12-14")); 
     167        $this->assertType('DateTime', syck_load("!php:Datetime 2002-12-14")); 
    168168    } 
    169169