本文整理汇总了PHP中AEUtilFilesystem::TranslateWinPath方法的典型用法代码示例。如果您正苦于以下问题:PHP AEUtilFilesystem::TranslateWinPath方法的具体用法?PHP AEUtilFilesystem::TranslateWinPath怎么用?PHP AEUtilFilesystem::TranslateWinPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AEUtilFilesystem
的用法示例。
在下文中一共展示了AEUtilFilesystem::TranslateWinPath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unregisterAndDeleteTempFile
/**
* Unregister and delete a temporary file
* @param $fileName The filename to unregister and delte
* @param $removePrefix The prefix to remove
*/
static function unregisterAndDeleteTempFile( $fileName, $removePrefix = false )
{
$configuration =& AEFactory::getConfiguration();
if($removePrefix)
{
$fileName = str_replace( AEUtilFilesystem::TranslateWinPath($configuration->get('akeeba.basic.temporary_directory')) , '', $fileName);
if( (substr($fileName, 0, 1) == '/') || (substr($fileName, 0, 1) == '\\') )
{
$fileName = substr($fileName, 1 );
}
if( (substr($fileName, -1) == '/') || (substr($fileName, -1) == '\\') )
{
$fileName = substr($fileName, 0, -1 );
}
}
// We don't unregister the tempfile here, because on some systems (Windows &
// servers on FastCGI) the files wouldn't get deleted.
$file = $configuration->get('akeeba.basic.temporary_directory').DS.$fileName;
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "-- Removing temporary file $fileName" );
$platform = strtoupper(PHP_OS);
if( (substr($platform,0,6) == 'CYGWIN') || (substr($platform,0,3) == 'WIN') )
{
// On Windows we have to chwon() the file first to make it owned by Nobody
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "-- Windows hack: chowning $fileName" );
@chown($file, 600);
}
return @self::nullifyAndDelete($file);
}
示例2: __construct
public function __construct()
{
$this->object = 'dir';
$this->subtype = 'inclusion';
$this->method = 'direct';
// FIXME This filter doesn't work very well on many live hosts. Disabled for now.
parent::__construct();
return;
if (empty($this->filter_name)) {
$this->filter_name = strtolower(basename(__FILE__, '.php'));
}
// Get the saved library path and compare it to the default
$jlibdir = AEPlatform::getInstance()->get_platform_configuration_option('jlibrariesdir', '');
if (empty($jlibdir)) {
if (defined('JPATH_LIBRARIES')) {
$jlibdir = JPATH_LIBRARIES;
} elseif (defined('JPATH_PLATFORM')) {
$jlibdir = JPATH_PLATFORM;
} else {
$jlibdir = false;
}
}
if ($jlibdir !== false) {
$jlibdir = AEUtilFilesystem::TranslateWinPath($jlibdir);
$defaultLibraries = AEUtilFilesystem::TranslateWinPath(JPATH_SITE . '/libraries');
if ($defaultLibraries != $jlibdir) {
// The path differs, add it here
$this->filter_data['JPATH_LIBRARIES'] = $jlibdir;
}
} else {
$this->filter_data = array();
}
parent::__construct();
}
示例3: scanFolder
protected function scanFolder($folder, &$position, $forFolders = true, $threshold_key = 'dir', $threshold_default = 50)
{
$registry = AEFactory::getConfiguration();
// Initialize variables
$arr = array();
$false = false;
if (!is_dir($folder) && !is_dir($folder . '/')) {
return $false;
}
try {
$di = new DirectoryIterator($folder);
} catch (Exception $e) {
$this->setWarning('Unreadable directory ' . $folder);
return $false;
}
if (!$di->valid()) {
$this->setWarning('Unreadable directory ' . $folder);
return $false;
}
if (!empty($position)) {
$di->seek($position);
if ($di->key() != $position) {
$position = null;
return $arr;
}
}
$counter = 0;
$maxCounter = $registry->get("engine.scan.large.{$threshold_key}_threshold", $threshold_default);
while ($di->valid()) {
if ($di->isDot()) {
$di->next();
continue;
}
if ($di->isDir() != $forFolders) {
$di->next();
continue;
}
$ds = $folder == '' || $folder == '/' || @substr($folder, -1) == '/' || @substr($folder, -1) == DIRECTORY_SEPARATOR ? '' : DIRECTORY_SEPARATOR;
$dir = $folder . $ds . $di->getFilename();
$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;
if ($data) {
$counter++;
$arr[] = $data;
}
if ($counter == $maxCounter) {
break;
} else {
$di->next();
}
}
// Determine the new value for the position
$di->next();
if ($di->valid()) {
$position = $di->key() - 1;
} else {
$position = null;
}
return $arr;
}
示例4: get_site_path
private function get_site_path()
{
// FIX 1.1.0 $mosConfig_absolute_path may contain trailing slashes or backslashes incompatible with exclusion filters
// FIX 1.2.2 Some hosts yield an empty string on realpath(JPATH_SITE)
// FIX 2.2 On Windows, realpath might fail
// FIX 2.4: Make an assumption (wild guess...)
if( (JPATH_BASE == '/administrator') || (JPATH_ROOT == '') )
{
$this->setWarning("Your site's root is an empty string. I am trying a workaround.");
$jpath_site_real = '/';
}
else
{
// Fix 2.4: Make sure that $jpath_site_real contains something even if realpath fails
$jpath_site_real = @realpath(trim(JPATH_SITE));
$jpath_site_real = ($jpath_site_real === false) ? trim(JPATH_SITE) : $jpath_site_real;
$jpath_site_real = AEUtilFilesystem::TranslateWinPath($jpath_site_real);
}
if( $jpath_site_real == '' )
{
// The JPATH_SITE is resolved to an empty string; attempt a workaround
// Windows hosts
if(DIRECTORY_SEPARATOR == '\\')
{
if( (trim(JPATH_SITE) != '') && (trim(JPATH_SITE) != '\\') && (trim(JPATH_SITE) != '/'))
{
$this->setWarning("The site's root couldn't be normalized on a Windows host. Attempting workaround (filters might not work)");
$jpath_site_real = JPATH_SITE; // Forcibly use the configured JPATH_SITE
}
else
{
$this->setWarning("The normalized path to your site's root seems to be an empty string; I will attempt a workaround (Windows host)");
$jpath_site_real = '/'; // Start scanning from filesystem root (workaround mode)
}
}
// *NIX hosts
else
{
$this->setWarning("The normalized path to your site's root seems to be an empty string; I will attempt a workaround (*NIX host)");
# Fix 2.1 Since JPATH_SITE is an empty string, shouldn't I begin scanning from the FS root, for crying out loud? What was I thinking putting JPATH_SITE there?
$jpath_site_real = '/'; // Start scanning from filesystem root (workaround mode)
}
}
// Fix 2.4.b1 : Add the trailing slash
if( (substr($jpath_site_real,-1) != '/') && !empty($jpath_site_real) )
{
$jpath_site_real .= '/';
}
return $jpath_site_real;
}
示例5: processPart
public function processPart($absolute_filename, $upload_as = null)
{
// Retrieve engine configuration data
$config = AEFactory::getConfiguration();
$account = trim($config->get('engine.postproc.azure.account', ''));
$key = trim($config->get('engine.postproc.azure.key', ''));
$container = $config->get('engine.postproc.azure.container', 0);
$directory = $config->get('volatile.postproc.directory', null);
if (empty($directory)) {
$directory = $config->get('engine.postproc.azure.directory', 0);
}
// Sanity checks
if (empty($account)) {
$this->setWarning('You have not set up your Windows Azure account name');
return false;
}
if (empty($key)) {
$this->setWarning('You have not set up your Windows Azure key');
return false;
}
if (empty($container)) {
$this->setWarning('You have not set up your Windows Azure container');
return false;
}
// Fix the directory name, if required
if (!empty($directory)) {
$directory = trim($directory);
$directory = ltrim(AEUtilFilesystem::TranslateWinPath($directory), '/');
} else {
$directory = '';
}
// Parse tags
$directory = AEUtilFilesystem::replace_archive_name_variables($directory);
$config->set('volatile.postproc.directory', $directory);
// Calculate relative remote filename
$filename = basename($absolute_filename);
if (!empty($directory) && $directory != '/') {
$filename = $directory . '/' . $filename;
}
// Store the absolute remote path in the class property
$this->remote_path = $filename;
// Connect and send
try {
$blob = new AEUtilAzure(AEUtilAzureStorage::URL_CLOUD_BLOB, $account, $key);
$policyNone = new AEUtilAzureNoRetryPolicy();
$blob->setRetryPolicy($policyNone);
$blob->putBlob($container, $filename, $absolute_filename);
} catch (Exception $e) {
$this->setWarning($e->getMessage());
return false;
}
return true;
}
示例6: treatDirectory
private static function treatDirectory($directory)
{
$site_root = AEUtilFilesystem::TrimTrailingSlash(AEUtilFilesystem::TranslateWinPath(JPATH_ROOT));
$directory = AEUtilFilesystem::TrimTrailingSlash(AEUtilFilesystem::TranslateWinPath($directory));
// Trim site root from beginning of directory
if (substr($directory, 0, strlen($site_root)) == $site_root) {
$directory = substr($directory, strlen($site_root));
if (substr($directory, 0, 1) == '/') {
$directory = substr($directory, 1);
}
}
return $directory;
}
示例7: unregisterAndDeleteTempFile
/**
* Unregister and delete a temporary file
* @param $fileName The filename to unregister and delte
* @param $removePrefix The prefix to remove
*/
static function unregisterAndDeleteTempFile($fileName, $removePrefix = false)
{
$configuration = AEFactory::getConfiguration();
if ($removePrefix) {
$fileName = str_replace(AEUtilFilesystem::TranslateWinPath($configuration->get('akeeba.basic.output_directory')), '', $fileName);
if (substr($fileName, 0, 1) == '/' || substr($fileName, 0, 1) == '\\') {
$fileName = substr($fileName, 1);
}
if (substr($fileName, -1) == '/' || substr($fileName, -1) == '\\') {
$fileName = substr($fileName, 0, -1);
}
}
// Make sure this file is registered
$configuration = AEFactory::getConfiguration();
$tempFiles = $configuration->get('volatile.tempfiles', false);
if ($tempFiles === false) {
$tempFiles = array();
} else {
$tempFiles = @unserialize($tempFiles);
}
$found = false;
if (!empty($tempFiles)) {
$found = in_array($fileName, $tempFiles);
}
if (!$found) {
return false;
}
$file = $configuration->get('akeeba.basic.output_directory') . '/' . $fileName;
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "-- Removing temporary file {$fileName}");
$platform = strtoupper(PHP_OS);
if (substr($platform, 0, 6) == 'CYGWIN' || substr($platform, 0, 3) == 'WIN') {
// On Windows we have to chwon() the file first to make it owned by Nobody
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "-- Windows hack: chowning {$fileName}");
@chown($file, 600);
}
$result = @self::nullifyAndDelete($file);
// Make sure the file is removed before unregistering it
if (!@file_exists($file)) {
$aPos = array_search($fileName, $tempFiles);
if ($aPos !== false) {
unset($tempFiles[$aPos]);
$configuration->set('volatile.tempfiles', serialize($tempFiles));
}
}
return $result;
}
示例8: treatDirectory
private static function treatDirectory($directory)
{
// Get the site's root
$configuration = AEFactory::getConfiguration();
if ($configuration->get('akeeba.platform.override_root', 0)) {
$root = $configuration->get('akeeba.platform.newroot', '[SITEROOT]');
if (stristr($root, '[')) {
$root = AEUtilFilesystem::translateStockDirs($root);
}
$site_root = AEUtilFilesystem::TrimTrailingSlash(AEUtilFilesystem::TranslateWinPath($root));
} else {
$site_root = AEUtilFilesystem::TrimTrailingSlash(AEUtilFilesystem::TranslateWinPath(JPATH_ROOT));
}
$directory = AEUtilFilesystem::TrimTrailingSlash(AEUtilFilesystem::TranslateWinPath($directory));
// Trim site root from beginning of directory
if (substr($directory, 0, strlen($site_root)) == $site_root) {
$directory = substr($directory, strlen($site_root));
if (substr($directory, 0, 1) == '/') {
$directory = substr($directory, 1);
}
}
return $directory;
}
示例9: processPart
public function processPart($absolute_filename, $upload_as = null)
{
// Retrieve engine configuration data
$config = AEFactory::getConfiguration();
$accesskey = trim($config->get('engine.postproc.googlestorage.accesskey', ''));
$secret = trim($config->get('engine.postproc.googlestorage.secretkey', ''));
$usessl = $config->get('engine.postproc.googlestorage.usessl', 0) == 0 ? false : true;
$bucket = $config->get('engine.postproc.googlestorage.bucket', '');
$directory = $config->get('volatile.postproc.directory', null);
$lowercase = $config->get('engine.postproc.googlestorage.lowercase', 1);
if (empty($directory)) {
$directory = $config->get('engine.postproc.googlestorage.directory', 0);
}
// Sanity checks
if (empty($accesskey)) {
$this->setError('You have not set up your Google Storage Access Key');
return false;
}
if (empty($secret)) {
$this->setError('You have not set up your Google Storage Secret Key');
return false;
}
if (empty($bucket)) {
$this->setError('You have not set up your Google Storage Bucket');
return false;
} else {
// Remove any slashes from the bucket
$bucket = str_replace('/', '', $bucket);
if ($lowercase) {
$bucket = strtolower($bucket);
}
}
// Create an S3 instance with the required credentials
$s3 = AEUtilAmazons3::getInstance($accesskey, $secret, $usessl);
$s3->defaultHost = 'commondatastorage.googleapis.com';
// If we are here, we'll have to start uploading the file. Let's prepare ourselves for that.
// Fix the directory name, if required
if (!empty($directory)) {
$directory = trim($directory);
$directory = ltrim(AEUtilFilesystem::TranslateWinPath($directory), '/');
} else {
$directory = '';
}
// Parse tags
$directory = AEUtilFilesystem::replace_archive_name_variables($directory);
$config->set('volatile.postproc.directory', $directory);
// Calculate relative remote filename
$filename = empty($upload_as) ? basename($absolute_filename) : $upload_as;
if (!empty($directory) && $directory != '/') {
$filename = $directory . '/' . $filename;
}
// Store the absolute remote path in the class property
$this->remote_path = $filename;
// Do we have to upload in one go or do a multipart upload instead?
$filesize = @filesize($absolute_filename);
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Google Storage -- Uploading " . basename($absolute_filename));
// Legacy single part uploads
$result = $s3->putObject(AEUtilAmazons3::inputFile($absolute_filename, false), $bucket, $filename, AEUtilAmazons3::ACL_BUCKET_OWNER_FULL_CONTROL, array(), array());
// Return the result
$this->propagateFromObject($s3);
return $result;
}
示例10: array
public static function &getFolders($folder, $fullpath = false)
{
// Initialize variables
$arr = array();
$false = false;
if (!is_dir($folder) && !is_dir($folder . '/')) {
return $false;
}
$handle = @opendir($folder);
if ($handle === FALSE) {
$handle = @opendir($folder . '/');
}
// If directory is not accessible, just return FALSE
if ($handle === FALSE) {
return $false;
}
$registry = AEFactory::getConfiguration();
$dereferencesymlinks = $registry->get('engine.archiver.common.dereference_symlinks');
while (($file = @readdir($handle)) !== false) {
if ($file != '.' && $file != '..') {
$dir = "{$folder}/{$file}";
$isDir = @is_dir($dir);
$isLink = @is_link($dir);
if ($isDir) {
//if(!$dereferencesymlinks && $isLink) continue;
if ($fullpath) {
$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;
} else {
$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($file) : $file;
}
if ($data) {
$arr[] = $data;
}
}
}
}
@closedir($handle);
return $arr;
}
示例11: getPaths
/**
* Get the paths for a specific section
*
* @param string $section The section to get the path list for (engine, installer, gui, filter)
*
* @return array
*/
public static function getPaths($section = 'gui')
{
// Create the key if it's not already present
if (!array_key_exists($section, static::$paths)) {
static::$paths[$section] = array();
}
// Add the defaults if the list is empty
if (empty(static::$paths[$section])) {
switch ($section) {
case 'engine':
static::$paths[$section] = array(AEUtilFilesystem::TranslateWinPath(AEFactory::getAkeebaRoot() . '/engines'), AEUtilFilesystem::TranslateWinPath(AEFactory::getAkeebaRoot() . '/plugins/engines'));
break;
case 'installer':
static::$paths[$section] = array(AEUtilFilesystem::TranslateWinPath(AEPlatform::getInstance()->get_installer_images_path()));
break;
case 'gui':
// Add core GUI definitions
static::$paths[$section] = array(AEUtilFilesystem::TranslateWinPath(AEFactory::getAkeebaRoot() . '/core'));
// Add additional core GUI definitions
if (AKEEBA_PRO) {
AEUtilFilesystem::TranslateWinPath(static::$paths[$section][] = AEFactory::getAkeebaRoot() . '/plugins/core');
}
// Add platform GUI definition files
$platform_paths = AEPlatform::getInstance()->getPlatformDirectories();
foreach ($platform_paths as $p) {
static::$paths[$section][] = AEUtilFilesystem::TranslateWinPath($p . '/config');
}
break;
case 'filter':
static::$paths[$section] = array(AEUtilFilesystem::TranslateWinPath(AEFactory::getAkeebaRoot() . '/platform/filters/stack'), AEUtilFilesystem::TranslateWinPath(AEFactory::getAkeebaRoot() . '/filters/stack'), AEUtilFilesystem::TranslateWinPath(AEFactory::getAkeebaRoot() . '/plugins/filters/stack'));
$platform_paths = AEPlatform::getInstance()->getPlatformDirectories();
foreach ($platform_paths as $p) {
static::$paths[$section][] = AEUtilFilesystem::TranslateWinPath($p . '/filters/stack');
}
break;
}
}
return static::$paths[$section];
}
示例12: _getSettings
protected function _getSettings()
{
// Retrieve engine configuration data
$config = AEFactory::getConfiguration();
$username = trim($config->get('engine.postproc.webdav.username', ''));
$password = trim($config->get('engine.postproc.webdav.password', ''));
$url = trim($config->get('engine.postproc.webdav.url', ''));
$this->directory = $config->get('volatile.postproc.directory', null);
if (empty($this->directory)) {
$this->directory = $config->get('engine.postproc.webdav.directory', '');
}
// Sanity checks
if (empty($username) || empty($password)) {
$this->setError('You have not linked Akeeba Backup with your CloudMe account');
return false;
}
// Fix the directory name, if required
if (!empty($this->directory)) {
$this->directory = trim($this->directory);
$this->directory = ltrim(AEUtilFilesystem::TranslateWinPath($this->directory), '/');
} else {
$this->directory = '';
}
// Parse tags
$this->directory = AEUtilFilesystem::replace_archive_name_variables($this->directory);
$config->set('volatile.postproc.directory', $this->directory);
$settings = array('baseUri' => $url, 'userName' => $username, 'password' => $password);
$this->webdav = new AEUtilDavclient($settings);
$this->webdav->addTrustedCertificates(AKEEBA_CACERT_PEM);
return true;
}
示例13: _getEngineSettings
private function _getEngineSettings()
{
// Retrieve engine configuration data
$config = AEFactory::getConfiguration();
$email = trim($config->get('engine.postproc.sugarsync.email', ''));
$password = trim($config->get('engine.postproc.sugarsync.password', ''));
$directory = $config->get('volatile.postproc.directory', null);
if (empty($directory)) {
$directory = $config->get('engine.postproc.sugarsync.directory', 0);
}
// Sanity checks
if (empty($email)) {
$this->setWarning('You have not set up your SugarSync email address');
return false;
}
if (empty($password)) {
$this->setWarning('You have not set up your SugarSync password');
return false;
}
// Fix the directory name, if required
if (!empty($directory)) {
$directory = trim($directory);
$directory = ltrim(AEUtilFilesystem::TranslateWinPath($directory), '/');
} else {
$directory = '';
}
// Parse tags
$directory = AEUtilFilesystem::replace_archive_name_variables($directory);
$config->set('volatile.postproc.directory', $directory);
return array('email' => $email, 'password' => $password, 'directory' => $directory);
}
示例14: get_archive_name
/**
* Returns the relative and absolute path to the archive, if defined
*
* @param string $relative The relative path
* @param string $absolute The absolute path
*/
public static function get_archive_name(&$relative, &$absolute)
{
static $relative_path = null;
static $absolute_path = null;
if (is_null($relative_path) || is_null($absolute_path)) {
$registry = AEFactory::getConfiguration();
// Import volatile scripting keys to the registry
AEUtilScripting::importScriptingToRegistry();
// Determine the extension
$force_extension = AEUtilScripting::getScriptingParameter('core.forceextension', null);
if (is_null($force_extension)) {
$archiver = AEFactory::getArchiverEngine();
$extension = $archiver->getExtension();
} else {
$extension = $force_extension;
}
// Get the template name
$templateName = $registry->get('akeeba.basic.archive_name');
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Archive template name: {$templateName}");
// Parse all tags
$templateName = self::replace_archive_name_variables($templateName);
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Expanded template name: {$templateName}");
$ds = DIRECTORY_SEPARATOR;
$relative_path = $templateName . $extension;
$absolute_path = AEUtilFilesystem::TranslateWinPath($registry->get('akeeba.basic.output_directory') . $ds . $relative_path);
}
$relative = $relative_path;
$absolute = $absolute_path;
}
示例15: array
public function &getFolders($folder, &$position)
{
// Was the breakflag set BEFORE starting? -- This workaround is required due to PHP5 defaulting to assigning variables by reference
$registry = AEFactory::getConfiguration();
$breakflag_before_process = $registry->get('volatile.breakflag', false);
// Reset break flag before continuing
$breakflag = false;
// Initialize variables
$arr = array();
$false = false;
if (!is_dir($folder) && !is_dir($folder . '/')) {
return $false;
}
$counter = 0;
$registry = AEFactory::getConfiguration();
$maxCounter = $registry->get('engine.scan.smart.large_dir_threshold', 100);
$allowBreakflag = $registry->get('volatile.operation_counter', 0) != 0 && !$breakflag_before_process;
if ($this->method == 'opendir') {
$handle = @opendir($folder);
/* If opening the directory doesn't work, try adding a trailing slash. This is useful in cases
* like this: open_basedir=/home/user/www/ and the root is /home/user/www. Trying to scan
* /home/user/www results in error, trying to scan /home/user/www/ succeeds. Duh!
*/
if ($handle === false) {
$handle = @opendir($folder . '/');
}
// If directory is not accessible, just return FALSE
if ($handle === false) {
$this->setWarning('Unreadable directory ' . $folder);
return $false;
}
} else {
$handle = dir($folder);
if ($handle->handle === false) {
$handle = dir($folder . '/');
if ($handle->handle === false) {
$this->setWarning('Unreadable directory ' . $folder);
return $false;
}
}
}
while (($file = $this->method == 'opendir' ? @readdir($handle) : $handle->read()) !== false && !$breakflag) {
if ($file != '.' && $file != '..') {
// # Fix 2.4: Do not add DS if we are on the site's root and it's an empty string
$ds = $folder == '' || $folder == '/' || @substr($folder, -1) == '/' || @substr($folder, -1) == DIRECTORY_SEPARATOR ? '' : DIRECTORY_SEPARATOR;
$dir = $folder . $ds . $file;
$isDir = is_dir($dir);
if ($isDir) {
$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;
if ($data) {
$arr[] = $data;
}
}
}
$counter++;
if ($counter >= $maxCounter) {
$breakflag = $allowBreakflag;
}
}
$this->method == 'opendir' ? @closedir($handle) : $handle->close();
// Save break flag status
$registry->set('volatile.breakflag', $breakflag);
return $arr;
}