本文整理汇总了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
//.........这里部分代码省略.........