Changeset 741 in svn
- Timestamp:
- 2011-04-13T04:30:17Z (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Decompiler.class.php
r737 r741 12 12 { 13 13 if (is_object($code)) { 14 if (get_class($code) != 'Decompiler_Code') { 15 $code = toCode($code, $indent); 16 } 14 $code = toCode($code, $indent); 17 15 return $code->__toString(); 18 16 } … … 21 19 } 22 20 // }}} 23 function toCode($src, $indent = '') // {{{ 21 function toCode($src, $indent = '') // {{{ wrap or rewrap anything to Decompiler_Code 24 22 { 25 23 if (is_array($indent)) { … … 27 25 } 28 26 29 if (is_object($src)) { 30 if (!method_exists($src, 'toCode')) { 31 var_dump($src); 32 exit('no toCode'); 33 } 34 return new Decompiler_Code($src->toCode($indent)); 35 } 36 37 return new Decompiler_Code($src); 27 if (!is_object($src)) { 28 return new Decompiler_Code($src); 29 } 30 31 if (!method_exists($src, 'toCode')) { 32 var_dump($src); 33 exit('no toCode'); 34 } 35 if (get_class($src) != 'Decompiler_Code') { 36 // rewrap it 37 $src = new Decompiler_Code($src->toCode($indent)); 38 } 39 40 return $src; 38 41 } 39 42 // }}} … … 91 94 function toCode($indent) 92 95 { 93 return $this ;96 return $this->src; 94 97 } 95 98
Note: See TracChangeset
for help on using the changeset viewer.