Formatting output Plese Wait...
mediaRouter Class Reference
Media Router The Zigmoyd Shared Content Router.
More...
|
Public Member Functions |
| getMimeType ($extension) |
| returns the Mime Type of the File By Extension returns mime type from system (e.g.
|
| defineSharedPaths () |
| define Constants to loacte the Path Correctly and flexibly
|
| determineSharedPath () |
| returns the shared Partial path of the requested file
|
| locateSharedPath () |
| returns the shared full system path of the requested file
|
| sendContentType () |
| send the Mime Content Tyoe of teh Requested file
|
| send404 () |
| sends 404 Header
|
| readFile () |
| Reads teh requested file and sends it to teh output Buffer (e.g.
|
| doRoute () |
| Do the Routing (e.g.
|
Detailed Description
Media Router The Zigmoyd Shared Content Router.
Private
Definition at line 43 of file rt.php.
Member Function Documentation
mediaRouter::getMimeType( string $extension )
returns the Mime Type of the File By Extension returns mime type from system (e.g.
Unix's /etc/mime.types or apache's mime.types File is not exists on zigmoyd's etc/mime.types)
Private
- Parameters:
-
- Returns:
- string
Definition at line 52 of file rt.php.
Referenced by readFile(), and sendContentType().
Show Source00052 {
00053 $mime = parse_ini_file(ZIGSETTINGS.DRS.'mime.types.ini.php');
00054 if(!isset($mime[$extension])){
00055 return mime_content_type($mime[$extension]);
00056 }else{
00057 return $mime[$extension];
00058 }
00059 }
Top
mediaRouter::defineSharedPaths( )
define Constants to loacte the Path Correctly and flexibly
Private
Definition at line 65 of file rt.php.
Referenced by doRoute().
Show Source00065 {
00066 $dummyBin = parse_ini_file(ZIGSETTINGS.DRS.'mime.types.ini.php', true);
00067 foreach($dummyBin['flag'] as $defKey => $defVal){
00068 if(!defined($defKey))define($defKey, $defVal);
00069 }
00070 }
Top
mediaRouter::determineSharedPath( )
returns the shared Partial path of the requested file
Private
- Returns:
- string
Definition at line 77 of file rt.php.
References $GLOBALS, and perror().
Show Source00077 {
00078 switch($GLOBALS['contentType']){
00079 case ZIG_ROUTE_FLAG_UPLOAD:
00080 return Z_DIR_TRANS_UP;
00081 break;
00082 case ZIG_ROUTE_FLAG_DOWNLOAD:
00083 return Z_DIR_TRANS_DN;
00084 break;
00085 case ZIG_ROUTE_FLAG_PIX:
00086 return Z_DIR_IMG;
00087 break;
00088 case ZIG_ROUTE_FLAG_JS:
00089 return Z_DIR_JS;
00090 break;
00091 case ZIG_ROUTE_FLAG_VBS:
00092 return Z_DIR_VBS;
00093 break;
00094 case ZIG_ROUTE_FLAG_CSS:
00095 return Z_DIR_CSS;
00096 break;
00097 case ZIG_ROUTE_FLAG_AJX_JS:
00098 return Z_DIR_AJX_C;
00099 break;
00100 default:
00101 perror('<code>zigmoyd.SharedContent.route</code>Invalid Type '.$GLOBALS['contentType']);
00102 }
00103 }
Top
mediaRouter::locateSharedPath( )
returns the shared full system path of the requested file
Private
- Returns:
- string
Definition at line 110 of file rt.php.
References $GLOBALS.
Referenced by readFile().
Show Source00110 {
00111 $path = ZIGROOT.DRS.Z_DIR_PROJECTS.DRS.fstab_getProjectDirByName($GLOBALS['prjName']).DRS.mediaRouter::determineSharedPath().$GLOBALS['filePath'];
00112 return $path;
00113 }
Top
mediaRouter::sendContentType( )
sends 404 Header
Private
Definition at line 132 of file rt.php.
Referenced by readFile().
Show Source00132 {
00133 header('HTTP/1.0 404 Not Found');
00134 }
Top
The documentation for this class was generated from the following file: