本文整理汇总了PHP中AEPlatform::move方法的典型用法代码示例。如果您正苦于以下问题:PHP AEPlatform::move方法的具体用法?PHP AEPlatform::move怎么用?PHP AEPlatform::move使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AEPlatform
的用法示例。
在下文中一共展示了AEPlatform::move方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _finalize
/**
* Implements the _finalize() abstract method
*
*/
protected function _finalize()
{
static $addedExtraSQL = false;
// This makes sure that we don't re-add the extra SQL if the archiver needed more time
// to include our file in the archive...
if(!$addedExtraSQL)
{
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Adding any extra SQL statements imposed by the filters");
$filters =& AEFactory::getFilters();
$this->writeline( $filters->getExtraSQL($this->databaseRoot) );
}
// Close the file pointer (otherwise the SQL file is left behind)
$this->closeFile();
// If we are not just doing a main db only backup, add the SQL file to the archive
$finished = true;
$configuration =& AEFactory::getConfiguration();
if( AEUtilScripting::getScriptingParameter('db.saveasname','normal') != 'output' )
{
$archiver =& AEFactory::getArchiverEngine();
$configuration =& AEFactory::getConfiguration();
if( $configuration->get('volatile.engine.archiver.processingfile',false) )
{
// We had already started archiving the db file, but it needs more time
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Continuing adding the SQL dump to the archive");
$archiver->addFile(null,null,null);
if($this->getError()) return;
$finished = !$configuration->get('volatile.engine.archiver.processingfile',false);
}
else
{
// We have to add the dump file to the archive
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Adding the SQL dump to the archive");
$archiver->addFileRenamed( $this->tempFile, $this->saveAsName );
if($this->getError()) return;
$finished = !$configuration->get('volatile.engine.archiver.processingfile',false);
}
}
else
{
// We just have to move the dump file to its final destination
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Moving the SQL dump to its final location");
$result = AEPlatform::move( $this->tempFile, $this->saveAsName );
if(!$result)
{
$this->setError('Could not move the SQL dump to its final location');
}
}
// Make sure that if the archiver needs more time to process the file we can supply it
if($finished)
{
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Removing temporary file");
AEUtilTempfiles::unregisterAndDeleteTempFile( $this->tempFile, true );
if($this->getError()) return;
$this->setState('finished');
}
}