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


PHP AText类代码示例

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


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

示例1: getRecommended

 public function getRecommended()
 {
     static $phpOptions = array();
     if (empty($phpOptions)) {
         $phpOptions[] = array('label' => AText::_('MAIN_REC_SAFEMODE'), 'current' => (bool) ini_get('safe_mode'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_MCR'), 'current' => (bool) ini_get('magic_quotes_runtime'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_MCGPC'), 'current' => (bool) ini_get('magic_quotes_gpc'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_CURL'), 'current' => function_exists('curl_init'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_FTP'), 'current' => function_exists('ftp_connect'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_SSH2'), 'current' => extension_loaded('ssh2'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_FOPEN'), 'current' => ini_get('allow_url_fopen'), 'recommended' => true);
         if (function_exists('gzencode')) {
             $gz = @gzencode('dd') !== false;
         } else {
             $gz = false;
         }
         $phpOptions[] = array('label' => AText::_('MAIN_REC_GZ'), 'current' => $gz, 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_MCRYPT'), 'current' => function_exists('mcrypt_encrypt'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_DOM'), 'current' => extension_loaded('Dom'), 'recommended' => true);
     }
     return $phpOptions;
 }
开发者ID:akeeba,项目名称:angie,代码行数:25,代码来源:prestashopmain.php

示例2: start

 public function start()
 {
     $key = $this->input->get('key', null);
     $data = $this->input->get('dbinfo', null, 'array');
     if (empty($key) || empty($data['dbtype'])) {
         $result = array('percent' => 0, 'restored' => 0, 'total' => 0, 'eta' => 0, 'error' => AText::_('DATABASE_ERR_INVALIDKEY'), 'done' => 1);
         echo json_encode($result);
         return;
     }
     $model = AModel::getAnInstance('Database', 'AngieModel');
     $savedData = $model->getDatabaseInfo($key);
     if (is_object($savedData)) {
         $savedData = (array) $savedData;
     }
     if (!is_array($savedData)) {
         $savedData = array();
     }
     $data = array_merge($savedData, $data);
     $model->setDatabaseInfo($key, $data);
     $model->saveDatabasesIni();
     try {
         $restoreEngine = ADatabaseRestore::getInstance($key, $data);
         $restoreEngine->removeInformationFromStorage();
         $result = array('percent' => 0, 'restored' => 0, 'total' => $restoreEngine->getTotalSize(true), 'eta' => '–––', 'error' => '', 'done' => 0);
     } catch (Exception $exc) {
         $result = array('percent' => 0, 'restored' => 0, 'total' => 0, 'eta' => 0, 'error' => $exc->getMessage(), 'done' => 1);
     }
     echo json_encode($result);
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:29,代码来源:dbrestore.php

示例3: applyjson

 public function applyjson()
 {
     // We have to use the HTML filter, since the key could contain a forward slash
     // e.g. virtual_folders/first_folder
     $key = $this->input->getCmd('substep', 'default', 'html');
     if (empty($key)) {
         $result = array('percent' => 0, 'error' => AText::_('OFFSITEDIRS_ERR_INVALIDKEY'), 'done' => 1, 'showconfig' => '');
         echo json_encode($result);
         return;
     }
     try {
         /** @var AngieModelDrupal7Setup $model */
         $model = $this->getThisModel();
         $config = '';
         $error = '';
         $writtenConfiguration = $model->applySettings($key);
         if (!$writtenConfiguration) {
             /** @var AngieModelDrupal7Configuration $configModel */
             $configModel = AModel::getAnInstance('Configuration', 'AngieModel', array(), $this->container);
             $config = $configModel->getFileContents(APATH_SITE . '/sites/' . $key . '/settings.php');
             $error = AText::_('FINALISE_LBL_CONFIGINTRO') . '<br/>' . AText::_('FINALISE_LBL_CONFIGOUTRO');
         }
         $result = array('percent' => 100, 'error' => $error, 'done' => 1, 'showconfig' => $config);
     } catch (Exception $exc) {
         $result = array('percent' => 0, 'error' => $exc->getMessage(), 'done' => 1, 'showconfig' => '');
     }
     echo json_encode($result);
 }
开发者ID:akeeba,项目名称:angie,代码行数:28,代码来源:drupal7setup.php

示例4: applySettings

 /**
  * Apply the settings to the configuration file and the database
  */
 public function applySettings()
 {
     // Get the state variables and update the global configuration
     $stateVars = $this->getStateVariables();
     // -- General settings
     $this->configModel->set('sitename', $stateVars->sitename);
     $this->configModel->set('sitedescr', $stateVars->sitedescr);
     $this->configModel->set('siteurl', $stateVars->siteurl);
     // -- Database settings
     $connectionVars = $this->getDbConnectionVars();
     $this->configModel->set('dbtype', $connectionVars->dbtype);
     $this->configModel->set('dbhost', $connectionVars->dbhost);
     $this->configModel->set('dbuser', $connectionVars->dbuser);
     $this->configModel->set('dbpass', $connectionVars->dbpass);
     $this->configModel->set('dbname', $connectionVars->dbname);
     $this->configModel->set('dbprefix', $connectionVars->prefix);
     $this->configModel->saveToSession();
     // Sanity check
     if (!$stateVars->siteurl) {
         throw new Exception(AText::_('SETUP_SITEURL_REQUIRED'));
     }
     // Apply the Super Administrator changes
     $this->applySuperAdminChanges();
     // Get the wp-config.php file and try to save it
     if (!$this->configModel->writeConfig(APATH_ROOT . '/config.php')) {
         return false;
     }
     return true;
 }
开发者ID:akeeba,项目名称:angie,代码行数:32,代码来源:phpbbsetup.php

示例5: onBeforeMain

    public function onBeforeMain()
    {
        ADocument::getInstance()->addScriptDeclaration(<<<ENDSRIPT
var akeebaAjax = null;
\$(document).ready(function(){
    akeebaAjax = new akeebaAjaxConnector('index.php');

    akeebaAjax.callJSON({
        'view'   : 'runscripts',
        'format' : 'raw'
    });
});
ENDSRIPT
);
        $model = $this->getModel();
        $this->showconfig = $model->getState('showconfig', 0);
        if ($this->showconfig) {
            $this->configuration = AModel::getAnInstance('Configuration', 'AngieModel')->getFileContents();
        }
        if (ASession::getInstance()->get('tfa_warning', false)) {
            $this->extra_warning = '<div class="alert alert-block alert-error">';
            $this->extra_warning .= '<h4 class="alert-heading">' . AText::_('FINALISE_TFA_DISABLED_TITLE') . '</h4>';
            $this->extra_warning .= '<p>' . AText::_('FINALISE_TFA_DISABLED_BODY') . '</p>';
            $this->extra_warning .= '</div>';
        }
        return true;
    }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:27,代码来源:view.html.php

示例6: getRecommended

 public function getRecommended()
 {
     $phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
     $phpOptions[] = array('label' => AText::_('MAIN_REC_MCR'), 'current' => (bool) ini_get('magic_quotes_runtime'), 'recommended' => false);
     $phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
     $phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
     return $phpOptions;
 }
开发者ID:akeeba,项目名称:angie,代码行数:8,代码来源:magento2main.php

示例7: getRecommended

 public function getRecommended()
 {
     $phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
     $phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
     $phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
     $phpOptions[] = array('label' => AText::_('MAIN_REC_NATIVEZIP'), 'current' => function_exists('zip_open') && function_exists('zip_read'), 'recommended' => true);
     return $phpOptions;
 }
开发者ID:akeeba,项目名称:angie,代码行数:8,代码来源:drupal8main.php

示例8: initialise

 public function initialise()
 {
     // Load the version file
     require_once APATH_INSTALLATION . '/version.php';
     // Load text callbacks
     if (file_exists(APATH_INSTALLATION . '/angie/platform/iniprocess.php')) {
         require_once APATH_INSTALLATION . '/angie/platform/iniprocess.php';
         AText::addIniProcessCallback(array('IniProcess', 'processLanguageIniFile'));
     }
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:10,代码来源:application.php

示例9: getRecommended

 public function getRecommended()
 {
     static $phpOptions = array();
     if (empty($phpOptions)) {
         $phpOptions[] = array('label' => AText::_('MAIN_REC_SAFEMODE'), 'current' => (bool) ini_get('safe_mode'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_UPLOADS'), 'current' => (bool) ini_get('file_uploads'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_NATIVEZIP'), 'current' => function_exists('zip_open') && function_exists('zip_read'), 'recommended' => true);
     }
     return $phpOptions;
 }
开发者ID:akeeba,项目名称:angie,代码行数:13,代码来源:mauticmain.php

示例10: getRecommended

 public function getRecommended()
 {
     static $phpOptions = array();
     if (empty($phpOptions)) {
         $phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_UPLOADS'), 'current' => (bool) ini_get('file_uploads'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_XML'), 'current' => extension_loaded('xml'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_CURL'), 'current' => function_exists('curl_init'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_ICONV'), 'current' => extension_loaded('iconv'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_NATIVEZIP'), 'current' => function_exists('zip_open') && function_exists('zip_read'), 'recommended' => true);
     }
     return $phpOptions;
 }
开发者ID:akeeba,项目名称:angie,代码行数:13,代码来源:pagekitmain.php

示例11: unlock

 public function unlock()
 {
     $parts = explode(':', AKEEBA_PASSHASH);
     $password = $this->input->get('password', '', 'raw');
     $passHash = md5($password . $parts[1]);
     ASession::getInstance()->set('angie.passhash', $passHash);
     ASession::getInstance()->saveData();
     if ($passHash == $parts[0]) {
         $this->setRedirect('index.php?view=main');
     } else {
         $msg = AText::_('PASSWORD_ERR_INVALIDPASSWORD');
         $this->setRedirect('index.php?view=password', $msg, 'error');
     }
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:14,代码来源:password.php

示例12: moveDir

 public function moveDir($key)
 {
     $dirs = $this->getDirs(true, true);
     $dir = $dirs[$key];
     $info = $this->input->get('info', array(), 'array');
     $virtual = APATH_ROOT . '/' . $dir['virtual'];
     $target = str_replace(array('[SITEROOT]', '[ROOTPARENT]'), array(APATH_ROOT, realpath(APATH_ROOT . '/..')), $info['target']);
     if (!file_exists($virtual)) {
         throw new Exception(AText::_('OFFSITEDIRS_VIRTUAL_DIR_NOT_FOUND'), 0);
     }
     if (!$this->recurse_copy($virtual, $target)) {
         throw new Exception(AText::_('OFFSITEDIRS_VIRTUAL_COPY_ERROR'), 0);
     }
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:14,代码来源:offsitedirs.php

示例13: getRecommended

 public function getRecommended()
 {
     static $phpOptions = array();
     if (empty($phpOptions)) {
         $phpOptions[] = array('label' => AText::_('MAIN_REC_SAFEMODE'), 'current' => (bool) ini_get('safe_mode'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_MCR'), 'current' => (bool) ini_get('magic_quotes_runtime'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_MCGPC'), 'current' => (bool) ini_get('magic_quotes_gpc'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_CURL'), 'current' => function_exists('curl_init'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_FTP'), 'current' => function_exists('ftp_connect'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_SSH2'), 'current' => extension_loaded('ssh2'), 'recommended' => true);
     }
     return $phpOptions;
 }
开发者ID:akeeba,项目名称:angie,代码行数:16,代码来源:genericmain.php

示例14: move

 public function move()
 {
     // We have to use the HTML filter, since the key could contain a forward slash
     // e.g. virtual_folders/first_folder
     $key = $this->input->get('key', null, 'html');
     if (empty($key)) {
         $result = array('percent' => 0, 'error' => AText::_('OFFSITEDIRS_ERR_INVALIDKEY'), 'done' => 1);
         echo json_encode($result);
         return;
     }
     try {
         $this->getThisModel()->moveDir($key);
         $result = array('percent' => 100, 'error' => '', 'done' => 1);
     } catch (Exception $exc) {
         $result = array('percent' => 0, 'error' => $exc->getMessage(), 'done' => 1);
     }
     echo json_encode($result);
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:18,代码来源:offsitedirs.php

示例15: getRecommended

 public function getRecommended()
 {
     static $phpOptions = array();
     if (empty($phpOptions)) {
         $jVersion = $this->container->session->get('jversion');
         $phpOptions[] = array('label' => AText::_('MAIN_REC_SAFEMODE'), 'current' => (bool) ini_get('safe_mode'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_UPLOADS'), 'current' => (bool) ini_get('file_uploads'), 'recommended' => true);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_MCR'), 'current' => (bool) ini_get('magic_quotes_runtime'), 'recommended' => false);
         if (version_compare($jVersion, '3.0.0', 'lt')) {
             $phpOptions[] = array('label' => AText::_('MAIN_REC_MCGPC'), 'current' => (bool) ini_get('magic_quotes_gpc'), 'recommended' => false);
         }
         $phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
         $phpOptions[] = array('label' => AText::_('MAIN_REC_NATIVEZIP'), 'current' => function_exists('zip_open') && function_exists('zip_read'), 'recommended' => true);
     }
     return $phpOptions;
 }
开发者ID:akeeba,项目名称:angie,代码行数:18,代码来源:joomlamain.php


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