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


PHP ArrayAdapter::int方法代码示例

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


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

示例1: executeImpl

 protected function executeImpl(ArrayAdapter $params)
 {
     $testingId = $params->int('id');
     $tasks = $params->arr('tasks');
     $time = $params->int('time');
     TestingManager::getInstance()->updateTestingResults($testingId, $time, $tasks);
     $pointsGiven = PL_testing::inst()->givePoints(PsUser::inst(), $testingId);
     return new AjaxSuccess($pointsGiven);
 }
开发者ID:ilivanoff,项目名称:www,代码行数:9,代码来源:TestingSave.php

示例2: executeImpl

 protected function executeImpl(ArrayAdapter $params)
 {
     $id = $params->int('id');
     $uts = $params->int('date');
     $show = $params->bool('show');
     $type = $params->str('type');
     $pp = Handlers::getInstance()->getPostsProcessorByPostType($type);
     AdminPostsBean::inst()->updateState($pp->dbBean(), $id, $uts, $show);
     return new AjaxSuccess();
 }
开发者ID:ilivanoff,项目名称:www,代码行数:10,代码来源:PostActivateAction.php

示例3: doProcess

 public function doProcess(ArrayAdapter $params)
 {
     $postId = $params->int('postId');
     $postType = $params->str('postType');
     $this->postCP = Handlers::getInstance()->getPostsProcessorByPostType($postType)->getPostContentProvider($postId);
     check_condition(!!$this->postCP, "Not found post with id='{$postId}' for post type='{$postType}'");
 }
开发者ID:ilivanoff,项目名称:www,代码行数:7,代码来源:postoriginalview.php

示例4: executeImpl

 protected function executeImpl(ArrayAdapter $params)
 {
     $unique = $params->str(DiscussionController::JS_DATA_UNIQUE);
     $upDown = $params->bool(DiscussionController::JS_DATA_UPDOWN);
     $entity = $params->str(DiscussionController::JS_DATA_THREAD);
     $theme = $params->str(self::JS_PARAM_THEME);
     $comment = $params->str(self::JS_PARAM_COMMENT);
     $parentId = $params->int(self::JS_PARAM_PARENT_ID);
     $controller = Handlers::getInstance()->getDiscussionController($unique);
     //Валидируем тему
     if (!$parentId && $controller->getDiscussionSettings()->isThemed()) {
         if (!$theme) {
             return 'Введите тему';
         }
         $error = UserInputValidator::validateShortText($theme);
         if ($error) {
             return $error;
         }
         $theme = UserInputTools::safeShortText($theme);
     }
     //Валидируем комментарий
     if (!$comment) {
         return 'Введите комментарий';
     }
     $error = UserInputValidator::validateLongText($comment);
     if ($error) {
         return $error;
     }
     $comment = UserInputTools::safeLongText($comment);
     $msgObj = $controller->saveMessage($entity, $parentId, $comment, $theme, PsUser::inst());
     if (!$msgObj instanceof DiscussionMsg) {
         return 'Ошибка добавления сообщения';
     }
     return new AjaxSuccess($controller->buildLeaf($msgObj));
 }
开发者ID:ilivanoff,项目名称:www,代码行数:35,代码来源:DiscussionAddMsg.php

示例5: doProcess

 public function doProcess(ArrayAdapter $params)
 {
     $postId = $params->int('postId');
     $postType = $params->str('postType');
     $pp = Handlers::getInstance()->getPostsProcessorByPostType($postType);
     $this->postCP = $pp->getPostContentProvider($postId);
 }
开发者ID:ilivanoff,项目名称:www,代码行数:7,代码来源:print.php

示例6: executeImpl

 protected function executeImpl(ArrayAdapter $params)
 {
     $unique = $params->str(DiscussionController::JS_DATA_UNIQUE);
     $upDown = $params->bool(DiscussionController::JS_DATA_UPDOWN);
     $entity = $params->int(DiscussionController::JS_DATA_THREAD);
     $action = $params->str(self::JS_PARAM_ACTION);
     $msgId = $params->int(self::JS_PARAM_MSG_ID);
     $rootId = $params->int(self::JS_PARAM_ROOT_ID);
     $controller = Handlers::getInstance()->getDiscussionController($unique);
     if (in_array($action, DiscussionController::getCommentActions())) {
         return new AjaxSuccess($controller->executeCommentAction($msgId, $action));
     }
     if ($action == DiscussionController::TREE_ACTION_LOAD_COMMENTS) {
         return new AjaxSuccess($controller->loadTree($rootId, $upDown, $entity));
     }
     return "Неизвестное действие: [{$action}]";
 }
开发者ID:ilivanoff,项目名称:www,代码行数:17,代码来源:DiscussionAction.php

示例7: __construct

 public function __construct($mandatory = true, $fileFormParam = FORM_PARAM_FILE)
 {
     if (!array_key_exists($fileFormParam, $_FILES)) {
         check_condition(!$mandatory, "Ключ [{$fileFormParam}] не найден в массиве файлов");
         return;
         //---
     }
     $this->params = ArrayAdapter::inst($_FILES[$fileFormParam]);
     $code = $this->params->int('error');
     if (!$mandatory && $code == UPLOAD_ERR_NO_FILE) {
         return;
         //---
     }
     check_condition($code == UPLOAD_ERR_OK, $this->getErrorDescription($code));
     $tmpName = $this->params->str('tmp_name');
     check_condition(is_uploaded_file($tmpName), 'Файл не является загруженным');
     $size = $this->params->int('size');
     check_condition($size > 0 && $size <= UPLOAD_MAX_FILE_SIZE, "Недопустимый размер загружаемого файла: {$size} байт.");
     $this->valid = true;
 }
开发者ID:ilivanoff,项目名称:www,代码行数:20,代码来源:FILEAdapter.php

示例8: getPluginContent

 public function getPluginContent($content, ArrayAdapter $params, PluginFetchingContext $ctxt)
 {
     $id = $params->int('id');
     $name = $params->str('test_name');
     $minutes = $params->int('time');
     $tasksCnt = $ctxt->getTasksCount();
     $result = null;
     $testing = null;
     if ($id) {
         $testing = TestingBean::inst()->updateTestingState($id, $name, $tasksCnt, $minutes);
         $result = TestingManager::getInstance()->getTestingResults($testing->getTestingId());
     }
     $tplData = $params->getData();
     $tplData['testing'] = $testing;
     $tplData['tasks'] = $content;
     $tplData['results'] = $result;
     $tplData['tasks_cnt'] = $tasksCnt;
     $content = $this->getFoldedEntity()->fetchTpl($tplData);
     $data = $testing ? $testing->getTestingId() : null;
     return new PluginContent($content, $data);
 }
开发者ID:ilivanoff,项目名称:www,代码行数:21,代码来源:testing.php

示例9: executeImpl

 protected function executeImpl(ArrayAdapter $params)
 {
     $name = $params->str('name');
     $type = $params->str('type');
     $ident = $params->str('ident');
     $rubId = $params->int('rubId');
     check_condition($name, 'Name is empty');
     $pp = Handlers::getInstance()->getPostsProcessorByPostType($type);
     $pp->getFolding()->assertExistsEntity($ident);
     AdminPostsBean::inst()->registerPost($pp->dbBean(), $ident, $name, $rubId);
     return new AjaxSuccess();
 }
开发者ID:ilivanoff,项目名称:www,代码行数:12,代码来源:PostEditAction.php

示例10: executeImpl

 protected function executeImpl(ArrayAdapter $params)
 {
     $id = $params->int('id');
     //feedId or userId - в зависимости от action
     $action = $params->str('action');
     $res = 'OK';
     switch ($action) {
         case 'delete':
             AdminFeedbackBean::inst()->deleteAnonimMsg($id);
             break;
         case 'load':
             //id = userId
             $res = FeedbackManager::inst()->buildDiscussion(false, $id, false);
             break;
         default:
             raise_error("Unknown action: {$action}");
     }
     return new AjaxSuccess($res);
 }
开发者ID:ilivanoff,项目名称:www,代码行数:19,代码来源:FeedbackAction.php

示例11: executeImpl

 protected function executeImpl(ArrayAdapter $params)
 {
     $avatarId = $params->int('id');
     //Может быть передан и PsConstJs::AVATAR_NO_SUFFIX, а значит - null
     $action = $params->str('action');
     $USER = PsUser::inst();
     switch ($action) {
         case 'set':
             check_condition($USER->setAvatar($avatarId), 'Ошибка установки текущего аватара.');
             break;
         case 'del':
             check_condition($USER->deteleAvatar($avatarId), 'Ошибка удаления аватара.');
             break;
         default:
             raise_error("Неизвестное действие [{$action}].");
     }
     $result['id'] = $USER->hasAvatar() ? $USER->getAvatarId() : PsConstJs::AVATAR_NO_SUFFIX;
     $result['src_big'] = $USER->getAvatarRelPath(PsUser::ID_CARD_AVATAR_DIM);
     return new AjaxSuccess($result);
 }
开发者ID:ilivanoff,项目名称:www,代码行数:20,代码来源:UserAvatarsAction.php

示例12: executeImpl

 protected function executeImpl(ArrayAdapter $params)
 {
     $action = $params->str('action');
     $date = $params->int('date');
     $res = array();
     switch ($action) {
         case 'search':
             $res = AdminAuditTools::getAuditStatistic($date);
             break;
         case 'dump':
             $where[] = Query::assocParam('dt_event', $date, true, '<=');
             $order[] = 'dt_event asc';
             $zipDi = AdminTableDump::dumpTable('id_rec', 'ps_audit', $where, $order);
             check_condition($zipDi instanceof DirItem, 'Ошибка снятия дампа. Смотрите лог для деталей.');
             $res['path'] = $zipDi->getAbsPath();
             break;
         case 'load-dumps':
             $res['dumps'] = AP_APAudit::getInstance()->getAuditDumpsInfo();
             break;
         default:
             raise_error("Unknown action: {$action}");
     }
     return new AjaxSuccess($res);
 }
开发者ID:ilivanoff,项目名称:www,代码行数:24,代码来源:AuditStatisticAction.php

示例13: executeImpl

 protected function executeImpl(ArrayAdapter $params)
 {
     UtilsBean::inst()->removeMissprint($params->int('id'));
     return new AjaxSuccess();
 }
开发者ID:ilivanoff,项目名称:www,代码行数:5,代码来源:MissprintAction.php

示例14: executeImpl

 protected function executeImpl(ArrayAdapter $params)
 {
     $post_id = $params->int('id');
     TrainManager::inst()->toggleLessonState($post_id);
     return new AjaxSuccess();
 }
开发者ID:ilivanoff,项目名称:www,代码行数:6,代码来源:ToggleLessonState.php

示例15: executeImpl

 protected function executeImpl(ArrayAdapter $params)
 {
     $testingResId = $params->int('id');
     TestingManager::getInstance()->dropTestingResults($testingResId);
     return new AjaxSuccess();
 }
开发者ID:ilivanoff,项目名称:www,代码行数:6,代码来源:TestingClearRes.php


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