当前位置: 首页>>代码示例>>PHP>>正文


PHP JoomlapackHelperUtils::getExpandedTarName方法代码示例

本文整理汇总了PHP中JoomlapackHelperUtils::getExpandedTarName方法的典型用法代码示例。如果您正苦于以下问题:PHP JoomlapackHelperUtils::getExpandedTarName方法的具体用法?PHP JoomlapackHelperUtils::getExpandedTarName怎么用?PHP JoomlapackHelperUtils::getExpandedTarName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JoomlapackHelperUtils的用法示例。


在下文中一共展示了JoomlapackHelperUtils::getExpandedTarName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getBackupFilePaths

 /**
  * Find where to store the backup files
  */
 function _getBackupFilePaths()
 {
     $configuration =& JoomlapackModelRegistry::getInstance();
     switch ($configuration->get('BackupType')) {
         case 'dbonly':
             // On DB Only backups we use different naming, no matter what's the setting
             JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackDumperDefault :: Only dump database mode detected");
             $this->_tempFile = JoomlapackHelperUtils::getExpandedTarName('.sql');
             $this->_saveAsName = '';
             break;
         case 'full':
             if ($this->_dumpFile != '') {
                 JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackDumperDefault :: Forced filename using dumpFile found.");
                 // If the dumpFile was set, forcibly use this value
                 $this->_tempFile = JoomlapackCUBETempfiles::registerTempFile(dechex(crc32(microtime() . $this->_dumpFile)));
                 $this->_saveAsName = 'installation/sql/' . $this->_dumpFile;
             } else {
                 if ($this->_isJoomla) {
                     // Joomla! Core Database, use the JoomlaPack way of figuring out the filenames
                     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackDumperDefault :: Core database");
                     $this->_tempFile = JoomlapackCUBETempfiles::registerTempFile(dechex(crc32(microtime() . 'joomla.sql')));
                     $this->_saveAsName = 'installation/sql/joomla.sql';
                 } else {
                     // External databases, we use the database's name
                     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackDumperDefault :: External database");
                     $this->_tempFile = JoomlapackCUBETempfiles::registerTempFile(dechex(crc32(microtime() . $this->_database . '.sql')));
                     $this->_saveAsName = 'installation/sql/' . $this->_database . '.sql';
                 }
             }
             break;
         case 'extradbonly':
             if ($this->_dumpFile != '') {
                 JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackDumperDefault :: Forced filename using dumpFile found.");
                 // If the dumpFile was set, forcibly use this value
                 $this->_tempFile = JoomlapackCUBETempfiles::registerTempFile(dechex(crc32(microtime() . $this->_dumpFile)));
                 $this->_saveAsName = $this->_dumpFile;
             } else {
                 if ($this->_isJoomla) {
                     // Joomla! Core Database, use the JoomlaPack way of figuring out the filenames
                     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackDumperDefault :: Core database");
                     $this->_tempFile = JoomlapackCUBETempfiles::registerTempFile(dechex(crc32(microtime() . 'joomla.sql')));
                     $this->_saveAsName = 'joomla.sql';
                 } else {
                     // External databases, we use the database's name
                     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackDumperDefault :: External database");
                     $this->_tempFile = JoomlapackCUBETempfiles::registerTempFile(dechex(crc32(microtime() . $this->_database . '.sql')));
                     $this->_saveAsName = $this->_database . '.sql';
                 }
             }
             break;
     }
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackDomainDBBackup :: SQL temp file is " . $this->_tempFile);
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackDomainDBBackup :: SQL file location in archive is " . $this->_saveAsName);
 }
开发者ID:Ratmir15,项目名称:Joomla---formula-of-success,代码行数:57,代码来源:mysqldump.php

示例2: start


//.........这里部分代码省略.........
         $temp = JoomlapackCUBETables::_getBase64() ? 'Available; will be used for temp vars' : 'Not available';
         JoomlapackLogger::WriteLog(_JP_LOG_INFO, "BASE64 Encoding    :" . $temp);
         JoomlapackLogger::WriteLog(_JP_LOG_INFO, "--------------------------------------------------------------------------------");
     }
     jpimport('helpers.status', true);
     $statushelper =& JoomlapackHelperStatus::getInstance();
     if ($statushelper->hasQuirks()) {
         JoomlapackLogger::WriteLog(_JP_LOG_INFO, "JoomlaPack has detected the following potential problems:");
         foreach ($statushelper->quirks as $q) {
             JoomlapackLogger::WriteLog(_JP_LOG_INFO, '- ' . $q['code'] . ' ' . $q['description'] . ' (' . $q['severity'] . ')');
         }
         JoomlapackLogger::WriteLog(_JP_LOG_INFO, "You probably do not have to worry about them, but you should be aware of them.");
         JoomlapackLogger::WriteLog(_JP_LOG_INFO, "--------------------------------------------------------------------------------");
     }
     // Get current profile ID
     $session =& JFactory::getSession();
     $profile_id = $session->get('profile', null, 'joomlapack');
     JoomlapackLogger::WriteLog(_JP_LOG_INFO, "Loading profile #{$profile_id}");
     // Get archive name
     switch ($configuration->get('BackupType')) {
         case 'dbonly':
             JoomlapackLogger::WriteLog(_JP_LOG_INFO, "JoomlaPack is starting a new database backup");
             $extension = '.sql';
             break;
         case 'full':
             JoomlapackLogger::WriteLog(_JP_LOG_INFO, "JoomlaPack is starting a new full site backup");
             // Instanciate archiver, only if not in DB only mode
             $archiver =& $this->provisioning->getArchiverEngine(true);
             if ($this->provisioning->getError()) {
                 $this->setError($this->provisioning->getError());
                 return;
             }
             $extension = $this->provisioning->archiveExtension;
             break;
         case 'extradbonly':
             JoomlapackLogger::WriteLog(_JP_LOG_INFO, "JoomlaPack is starting a new extra databases only backup");
             // Instanciate archiver, only if not in DB only mode
             $archiver =& $this->provisioning->getArchiverEngine(true);
             if ($this->provisioning->getError()) {
                 $this->setError($this->provisioning->getError());
                 return;
             }
             $extension = $this->provisioning->archiveExtension;
             break;
     }
     $relativeArchiveName = JoomlapackHelperUtils::getExpandedTarName($extension, false);
     $absoluteArchiveName = JoomlapackHelperUtils::getExpandedTarName($extension, true);
     // ==== Stats initialisation ===
     $this->statmodel->setId(0);
     // Detect backup origin
     if ($mainframe->isAdmin()) {
         $origin = 'backend';
     } else {
         $origin = 'frontend';
     }
     // Get profile
     $session =& JFactory::getSession();
     $profile_id = $session->get('profile', null, 'joomlapack');
     unset($session);
     // Create an initial stats entry
     jimport('joomla.utilities.date');
     $jdate = new JDate();
     switch ($configuration->get('BackupType')) {
         case 'full':
             $backupType = 'full';
             break;
         case 'dbonly':
             $backupType = 'dbonly';
             break;
         case 'extradbonly':
             $backupType = 'extradbonly';
             break;
     }
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "Backup type is now set to '" . $backupType . "'");
     $temp = array('description' => $description, 'comment' => $comment, 'backupstart' => $jdate->toMySQL(), 'status' => 'run', 'origin' => $origin, 'type' => $backupType, 'profile_id' => $profile_id, 'archivename' => $relativeArchiveName, 'absolute_path' => $absoluteArchiveName);
     // Save the entry
     $this->statmodel->save($temp);
     if ($this->statmodel->getError()) {
         $this->setError($this->statmodel->getError());
         return;
     }
     unset($temp);
     // Get the ID!
     $temp = $this->statmodel->getSavedTable();
     $this->_statID = $temp->id;
     // Initialize the archive.
     if ($configuration->get('BackupType') != 'dbonly') {
         JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "Expanded archive file name: " . $absoluteArchiveName);
         JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "Seeding archive with installer");
         $installerPackage = JPATH_COMPONENT_ADMINISTRATOR . DS . 'assets' . DS . "installers" . DS . $configuration->get('InstallerPackage');
         $archiver->initialize($installerPackage, $absoluteArchiveName);
         $archiver->setComment($comment);
         // Add the comment to the archive itself.
         if ($archiver->getError()) {
             $this->setError($archiver->getError());
             return;
         }
     }
     $this->_initialised = true;
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:101,代码来源:cube.php


注:本文中的JoomlapackHelperUtils::getExpandedTarName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。