Public Member Functions | |
| setExternal ($booExternal) | |
| getExternal () | |
| show ($strFullPathFile) | |
| getClassContent () | |
Static Public Member Functions | |
| static | getInstance () |
| static | requireOnce ($strFile, $booIsClass=false) |
Protected Attributes | |
| $booExternal = false | |
| $arrFiles = array() | |
| $strClassContent = '' | |
Static Protected Attributes | |
| static | $objInstance |
This class is responsable to make the classical load of the files and to make the visible code load, what is essencial to the external load of the component.
Definition at line 16 of file Loader.class.php.
| getClassContent | ( | ) |
| getExternal | ( | ) |
Get if the loader it is to external access
Loader->boolExternal
Definition at line 77 of file Loader.class.php.
Referenced by requireOnce().
| static getInstance | ( | ) | [static] |
Return the singleton instance of the Loader class
Definition at line 49 of file Loader.class.php.
Referenced by requireOnce().
00050 { 00051 if( self::$objInstance == null ) 00052 { 00053 self::$objInstance = new Loader(); 00054 } 00055 return self::$objInstance; 00056 }
| static requireOnce | ( | $ | strFile, | |
| $ | booIsClass = false | |||
| ) | [static] |
Require Once the file of the Code To Diagram
| string | $strFile | |
| boolean | $booIsClass |
Definition at line 88 of file Loader.class.php.
References $arrBackTrace, $arrCaller, $strFile, $strFileCaller, getExternal(), getInstance(), CorujaFileManipulation::getPathOfFile(), and CorujaFileManipulation::isRelativePath().
00089 { 00090 // print $strFile . '<br/>' . "\n"; 00091 $arrBackTrace = debug_backtrace(); 00092 $arrCaller = $arrBackTrace[0]; 00093 $strFileCaller = $arrCaller[ 'file' ]; 00094 $strPathCaller = CorujaFileManipulation::getPathOfFile( $strFileCaller ); 00095 00096 if( CorujaFileManipulation::isRelativePath( $strFile ) ) 00097 { 00098 $strFullPathFile = $strPathCaller . $strFile; 00099 } 00100 else 00101 { 00102 $strFullPathFile = $strFile; 00103 } 00104 00105 if( $booIsClass && self::getInstance()->getExternal() ) 00106 { 00107 self::getInstance()->show( $strFullPathFile ); 00108 } 00109 00110 require_once( $strFullPathFile ); 00111 }
| setExternal | ( | $ | booExternal | ) |
Set if the loader it is to extenal access
Loader->boolExternal
| boolean | $booExternal |
Definition at line 65 of file Loader.class.php.
References $booExternal.
00066 { 00067 $this->booExternal = $booExternal; 00068 }
| show | ( | $ | strFullPathFile | ) |
Definition at line 113 of file Loader.class.php.
00114 { 00115 if( !in_array( $strFullPathFile , $this->arrFiles ) ) 00116 { 00117 $this->arrFiles[] = $strFullPathFile; 00118 $this->strClassContent .= file_get_contents( $strFullPathFile ); 00119 } 00120 }
$arrFiles = array() [protected] |
Array of files already load by the lodader class
string[]
Definition at line 35 of file Loader.class.php.
$booExternal = false [protected] |
Flag if the loader it is to external access
boolean
Definition at line 28 of file Loader.class.php.
Referenced by setExternal().
$objInstance [static, protected] |
$strClassContent = '' [protected] |
1.5.9