glance-project/preg-service 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

glance-project/preg-service

Composer 安装命令:

composer require glance-project/preg-service

包简介

Abstraction on top of the CERN (P)re (REG)istration API

README 文档

README

This is an abstraction on top of the PREG (Pre REGistration) API.

Getting started

To use this library, you need to have an application registered on Application Portal. If you do not know what this means, refer to the CERN Authorization Service documentation. Make sure the registered application has OIDC SSO registration. The application needs to be added to the ‘grappa‘ group fence-api-read_{experiment} where experiment is alice, atlas, cms or lhcb.

With your application registered, you will use the Client ID and Client secret.

The official PREG API documentation can be found on the following URLs:

Usage

The PREG provider is created with application credentials.

// Example of $inProduction. Adapt for your needs!

$preRegistrationProvider = PreRegistrationProvider::createWithAppCredentials(
    $clientId       = getenv("CLIENT_ID"),
    $clientName     = getenv("CLIENT_SECRET"),
    $experimentName = "lhcb",
    $inProduction   = getenv("ENVIRONMENT") === "PRODUCTION",
);

PreRegistrationProvider::getPreRegistrations()

Get experiment's pre registrations.

$registrations = $preRegistrationProvider->getPreRegistrations();

echo($registrations[0]->personId());
echo($registrations[0]->documentId());

// Output:
// 123456
// 1234567

Schemas

The pre registration schema and its available options are as follows:

personId                    => int
documentId                  => int
participationExperiment     => string (example: LHCb)
personNatureOfEmployment    => string ([ ADMINISTRATION, ENGINEERING, PHYSICS, SUMMERSTUDENT, TECHNICAL, OTHER ])
personEducationLevel        => string ([ BSCUNDERGRADUATE, MSCDIPLOMA, OTHER, PHD ])
personStudyingStatus        => string ([ CONCLUDED, STUDYING ])
personSeniorStatus          => ?string ([ SENIOR, NOTSENIOR, NULL]) ## this is an optional field, meaning that NULL does not indicate if the person is a senior or not.

统计信息

  • 总下载量: 10.62k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2022-07-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固