/** * @return self */ private function _init() { $this->_objFileInformation = $this->_objRoundSaveThumb->getFileInformation()->one(); $this->_objFile = $this->_objFileInformation->getFile()->one(); $this->_objThumbsCategory = $this->_objRoundSaveThumb->getThumbsCategory()->one(); $this->_basePath = Module::getInstance()->params['file']['BASE_DIR']; $this->_originalFilePath = $this->_objFile->getFilePath(); $this->_fileExtention = image_type_to_extension($this->_objFile->getType()); $pattern = '#(.*\\/)' . Module::getInstance()->params['file']['FILE_ORIGINAL_NAME'] . '\\.#ui'; preg_match($pattern, $this->_originalFilePath, $arrSaveDir); $this->_thumbFileSaveDir = $arrSaveDir[1]; return $this; }