Changeset 726

Show
Ignore:
Timestamp:
06/10/07 12:24:01 (1 year ago)
Author:
mikey
Message:

bugfix: commit 725 broke stubSerializableObject behaviour

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/reflection/annotations/stubAbstractAnnotation.php

    r725 r726  
    6868     * not the reflection class itself because it can not be serialized 
    6969     * 
    70      * @return  array<string> 
     70     * @return  array<string>  list of properties to serialize 
    7171     */ 
    7272    public function __sleep() 
    7373    { 
    74         $propertiesToSerialize = array(); 
     74        $propertiesToSerialize       = array(); 
     75        $this->reflectedClasses      = array(); 
     76        $this->_serializedProperties = array(); 
    7577        foreach (get_object_vars($this) as $name => $value) { 
    7678            if ($value instanceof stubReflectionClass) { 
    7779                $this->reflectedClasses[$name] = $value->getFullQualifiedClassName(); 
     80            } elseif ($value instanceof stubSerializable) { 
     81                $this->_serializedProperties[$name] = $value->getSerialized(); 
    7882            } else { 
    7983                $propertiesToSerialize[] = $name; 
     
    8993    public function __wakeup() 
    9094    { 
     95        parent::__wakeup(); 
    9196        foreach ($this->reflectedClasses as $propertyName => $reflectedClasses) { 
    9297            $this->$propertyName = new stubReflectionClass($reflectedClasses);