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


PHP DataValidator::validate_testername方法代码示例

本文整理汇总了PHP中DataValidator::validate_testername方法的典型用法代码示例。如果您正苦于以下问题:PHP DataValidator::validate_testername方法的具体用法?PHP DataValidator::validate_testername怎么用?PHP DataValidator::validate_testername使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataValidator的用法示例。


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

示例1: getTesterTimeZone

 /**
  *
  * @param string $tester
  * @return string dsn or null
  */
 public static function getTesterTimeZone($tester)
 {
     if (DataValidator::validate_testername($tester, MULTIPROVIDER) === FALSE) {
         return NULL;
     }
     // FIXME:usare require_once?
     include_once ROOT_DIR . '/clients/' . $tester . '/client_conf.inc.php';
     $tester_in_uppercase = strtoupper($tester);
     $tester_timezone = $tester_in_uppercase . '_TIMEZONE';
     if (defined($tester_timezone)) {
         return constant($tester_timezone);
     }
     return null;
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:19,代码来源:multiport.inc.php

示例2: addTester

 public function addTester($tester)
 {
     $tester = DataValidator::validate_testername($tester, MULTIPROVIDER);
     if ($tester !== FALSE) {
         array_push($this->testers, $tester);
         return TRUE;
     }
     return FALSE;
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:9,代码来源:user_class.inc.php

示例3: unset

 if (DataValidator::validate_not_empty_string($_POST['tester_country']) === FALSE) {
     $errorsAr['tester_country'] = true;
 }
 if (DataValidator::validate_phone($_POST['tester_phone']) === FALSE) {
     $errorsAr['tester_phone'] = true;
 }
 if (DataValidator::validate_email($_POST['tester_email']) === FALSE) {
     $errorsAr['tester_email'] = true;
 }
 if (DataValidator::validate_string($_POST['tester_desc']) === FALSE) {
     $errorsAr['tester_desc'] = true;
 }
 if (DataValidator::validate_string($_POST['tester_resp']) === FALSE) {
     $errorsAr['tester_resp'] = true;
 }
 if (DataValidator::validate_testername($_POST['tester_pointer'], MULTIPROVIDER) === FALSE) {
     $errorsAr['tester_pointer'] = true;
 }
 if (count($errorsAr) > 0) {
     $tester_dataAr = $_POST;
     $form = AdminModuleHtmlLib::getEditTesterForm($testersAr, $tester_dataAr, $errorsAr);
 } else {
     unset($_POST['submit']);
     $tester_dataAr = $_POST;
     $result = $common_dh->set_tester($tester_dataAr['tester_id'], $tester_dataAr);
     if (AMA_Common_DataHandler::isError($result)) {
         $errObj = new ADA_Error($result);
         $form = new CText('');
     } else {
         header('Location: ' . HTTP_ROOT_DIR . '/admin/tester_profile.php?id_tester=' . $tester_dataAr['tester_id']);
         exit;
开发者ID:eguicciardi,项目名称:ada,代码行数:31,代码来源:edit_tester.php

示例4: getDefaultTester

 /**
  * getDefaultTester implementation:
  * - if it's not a multiprovider environment, return the user selected provider
  * - else return parent's method
  *
  * @see ADAAbstractUser::getDefaultTester()
  */
 public function getDefaultTester()
 {
     if (!MULTIPROVIDER) {
         $candidate = null;
         /**
          * the default tester is the only one in which the user is listed
          * that is NOT the public tester. So let's take the list of all
          * providers the user is registered into, remove the public one and
          * if what is left has only one element, this is the default tester.
          * Else we cannot tell for certain the default testers and return null.
          */
         $testersArr = $this->getTesters();
         if (!empty($testersArr)) {
             $testersArr = array_values(array_diff($testersArr, array(ADA_PUBLIC_TESTER)));
             if (count($testersArr) === 1) {
                 $candidate = $testersArr[0];
             }
         }
         $tester = DataValidator::validate_testername($candidate, MULTIPROVIDER);
         if ($tester !== false) {
             return $tester;
         } else {
             return NULL;
         }
     } else {
         return parent::getDefaultTester();
     }
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:35,代码来源:ADAUser.inc.php


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