Changeset 20964
- Timestamp:
- 08/09/09 17:25:49 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/lime/branches/2.0-experimental/lib/tester/LimeTesterObject.php
r20962 r20964 30 30 foreach ((array)$object as $key => $value) 31 31 { 32 // private and protected properties start with \0 32 // properties are transformed to keys in the following way: 33 34 // private $property => "\0Classname\0property" 35 // protected $property => "\0*\0property" 36 // public $property => "property" 37 33 38 if ($key{0} == "\0") 34 39 { 35 // private properties start with the class 36 if (strpos($key, get_class($object)) === 1) 40 if ($key{1} == '*') 37 41 { 38 $key = substr($key, strlen(get_class($object))+2);42 $key = substr($key, 3); 39 43 } 40 // protected properties start with *41 44 else 42 45 { 43 $key = substr($key, 3);46 $key = substr($key, strlen(get_class($object)) + 2); 44 47 } 45 48 }