Public Member Functions | |
getBaseMediaPath () | |
getBaseMediaUrl () | |
getBaseTmpMediaPath () | |
getBaseTmpMediaUrl () | |
getMediaUrl ($file) | |
getMediaPath ($file) | |
getTmpMediaUrl ($file) | |
getTmpMediaPath ($file) | |
Protected Member Functions | |
_prepareFileForUrl ($file) | |
_prepareFileForPath ($file) |
Definition at line 35 of file Config.php.
_prepareFileForPath | ( | $ | file | ) | [protected] |
Definition at line 106 of file Config.php.
00107 { 00108 return str_replace('/', DS, $file); 00109 }
_prepareFileForUrl | ( | $ | file | ) | [protected] |
Definition at line 101 of file Config.php.
00102 { 00103 return str_replace(DS, '/', $file); 00104 }
getBaseMediaPath | ( | ) |
Retrive base path for media files
Implements Mage_Media_Model_Image_Config_Interface.
Definition at line 37 of file Config.php.
00038 { 00039 return Mage::getBaseDir('media') . DS . 'catalog' . DS . 'product'; 00040 }
getBaseMediaUrl | ( | ) |
Retrive base url for media files
Implements Mage_Media_Model_Image_Config_Interface.
Definition at line 42 of file Config.php.
00043 { 00044 return Mage::getBaseUrl('media') . 'catalog/product'; 00045 }
getBaseTmpMediaPath | ( | ) |
Definition at line 47 of file Config.php.
00048 { 00049 return Mage::getBaseDir('media') . DS . 'tmp' . DS . 'catalog' . DS . 'product'; 00050 }
getBaseTmpMediaUrl | ( | ) |
Definition at line 52 of file Config.php.
00053 { 00054 return Mage::getBaseUrl('media') . 'tmp/catalog/product'; 00055 }
getMediaPath | ( | $ | file | ) |
Retrive file system path for media file
string | $file |
Implements Mage_Media_Model_Image_Config_Interface.
Definition at line 68 of file Config.php.
00069 { 00070 $file = $this->_prepareFileForPath($file); 00071 00072 if(substr($file, 0, 1) == DS) { 00073 return $this->getBaseMediaPath() . DS . substr($file, 1); 00074 } 00075 00076 return $this->getBaseMediaPath() . DS . $file; 00077 }
getMediaUrl | ( | $ | file | ) |
Retrive url for media file
string | $file |
Implements Mage_Media_Model_Image_Config_Interface.
Definition at line 57 of file Config.php.
00058 { 00059 $file = $this->_prepareFileForUrl($file); 00060 00061 if(substr($file, 0, 1) == '/') { 00062 return $this->getBaseMediaUrl() . $file; 00063 } 00064 00065 return $this->getBaseMediaUrl() . '/' . $file; 00066 }
getTmpMediaPath | ( | $ | file | ) |
Definition at line 90 of file Config.php.
00091 { 00092 $file = $this->_prepareFileForPath($file); 00093 00094 if(substr($file, 0, 1) == DS) { 00095 return $this->getBaseTmpMediaPath() . DS . substr($file, 1); 00096 } 00097 00098 return $this->getBaseTmpMediaPath() . DS . $file; 00099 }
getTmpMediaUrl | ( | $ | file | ) |
Definition at line 79 of file Config.php.
00080 { 00081 $file = $this->_prepareFileForUrl($file); 00082 00083 if(substr($file, 0, 1) == '/') { 00084 return $this->getBaseTmpMediaUrl() . $file; 00085 } 00086 00087 return $this->getBaseTmpMediaUrl() . '/' . $file; 00088 }