本文整理匯總了PHP中AEPlatform::configOverrides方法的典型用法代碼示例。如果您正苦於以下問題:PHP AEPlatform::configOverrides方法的具體用法?PHP AEPlatform::configOverrides怎麽用?PHP AEPlatform::configOverrides使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AEPlatform
的用法示例。
在下文中一共展示了AEPlatform::configOverrides方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: runBackup
public function runBackup()
{
$ret_array = array();
$ajaxTask = $this->getState('ajax');
switch($ajaxTask)
{
case 'start':
// Description is passed through a strict filter which removes HTML
$description = $this->getState('description');
// The comment is passed through the Safe HTML filter (note: use 2 to force no filtering)
$comment = $this->getState('comment');
$jpskey = $this->getState('jpskey');
$tag = $this->getState('tag');
// Try resetting the engine
AECoreKettenrad::reset();
// Remove any stale memory files left over from the previous step
if(empty($tag)) $tag = AEPlatform::get_backup_origin();
AEUtilTempvars::reset($tag);
$kettenrad =& AECoreKettenrad::load($tag);
// Take care of System Restore Point setup
if($tag == 'restorepoint') {
// Fetch the extension's version information
require_once JPATH_COMPONENT_ADMINISTRATOR.DS.'liveupdate'.DS.'classes'.DS.'xmlslurp.php';
$slurp = new LiveUpdateXMLSlurp();
$exttype = $this->getState('type');
switch($exttype) {
case 'component':
$extname = 'com_';
break;
case 'module':
$extname = 'mod_';
break;
case 'plugin':
$extname = 'plg_';
break;
case 'template':
$extname = 'tpl_';
break;
}
$extname .= $this->getState('name');
$info = $slurp->getInfo($extname, '');
// Get the configOverrides for this extension
AEPlatform::$configOverrides = $this->getConfigOverridesForSRP($extname, $info);
// Create an SRP descriptor
$srpdescriptor = array(
'type' => $this->getState('type'),
'name' => $this->getState('name'),
'group' => $this->getState('group'),
'version' => $info['version'],
'date' => $info['date']
);
// Set the description and comment
$description = "System Restore Point - ".JText::_($exttype).": $extname";
$comment = "---BEGIN SRP---\n".json_encode($srpdescriptor)."\n---END SRP---";
$jpskey = '';
// Set a custom finalization action queue
AEPlatform::$configOverrides['volatile.core.finalization.action_handlers'] = array(
new AEFinalizationSrpquotas()
);
AEPlatform::$configOverrides['volatile.core.finalization.action_queue'] = array(
'remove_temp_files',
'update_statistics',
'update_filesizes',
'apply_srp_quotas'
);
}
$options = array(
'description' => $description,
'comment' => $comment,
'jpskey' => $jpskey
);
$kettenrad->setup($options);
$kettenrad->tick();
if( ($kettenrad->getState() != 'running') && ($tag == 'restorepoint') ) {
$kettenrad->tick();
}
$ret_array = $kettenrad->getStatusArray();
$kettenrad->resetWarnings(); // So as not to have duplicate warnings reports
AECoreKettenrad::save($tag);
break;
case 'step':
$tag = $this->getState('tag');
$kettenrad =& AECoreKettenrad::load($tag);
$kettenrad->tick();
$ret_array = $kettenrad->getStatusArray();
$kettenrad->resetWarnings(); // So as not to have duplicate warnings reports
//.........這裏部分代碼省略.........