CodeReflectionProperty.class.php
Go to the documentation of this file.00001 <?php
00013 class CodeReflectionProperty extends ExtendedReflectionProperty
00014 {
00029 public function getDefaultValue()
00030 {
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 return null;
00053 }
00054 public function getCode()
00055 {
00056
00057 $strCode = "";
00058 $strCode .= CorujaStringManipulation::retab( $this->getDocComment() , 1 );
00059 if( $this->isPrivate() )
00060 {
00061 $strCode .= " private ";
00062 }
00063 if( $this->isProtected())
00064 {
00065 $strCode .= " protected ";
00066 }
00067 if( $this->isPublic())
00068 {
00069 $strCode .= " public ";
00070 }
00071 if( $this->isStatic() )
00072 {
00073 $strCode .= " static ";
00074 }
00075 $strCode .= '$'. $this->getName();
00076
00077 $strCode .= ' = ' . var_export( $this->getDefaultValue() , true );
00078 $strCode .= ";" . "\n";
00079
00080 return $strCode;
00081 }
00082
00083 protected function createExtendedReflectionClass( ReflectionClass $objOriginalReflectionClass )
00084 {
00085 return new CodeReflectionClass( $objOriginalReflectionClass->getName() );
00086 }
00087
00088 }
00089 ?>