00001 <? 00002 require_once( "_start.php" ); 00003 00010 class exampleFirst{} 00011 class exampleSecond{} 00012 interface exampleInterfaceOne{} 00013 interface exampleInterfaceTwo{} 00014 00015 class ExampleCodeReflecion extends exampleFirst implements exampleInterfaceOne, exampleInterfaceTwo 00016 { 00022 private $strName; 00023 00024 static protected $arrParadas = array(); 00025 00031 final public function doSomethingCool( $strName = "hi" , exampleSecond $obSecond = null , exampleSecond $objLastOne = null ) 00032 { 00033 $this->strName = $strName; 00034 print "i change the name to " . $this->strName; 00035 $this->doNothing(); 00036 } 00037 00038 private static function doNothing() 00039 { 00040 // empty... 00041 } 00042 00043 public function hardWork() 00044 { 00045 for( $i = 0 ; $i < 20 ; $i++ ) 00046 { 00047 $this->doSomethingCool( $i ); 00048 } 00049 } 00050 }; 00051 00052 $oReflectionCode = new CodeReflectionClass( "ExampleCodeReflecion" ); 00053 $strNewCode = $oReflectionCode->getCode(); 00054 CorujaDebug::debug( $strNewCode, true, "php" ); 00055 00056 ?>
1.5.9