lsolesen/edbbrugs-php-sdk
Composer 安装命令:
composer require lsolesen/edbbrugs-php-sdk
包简介
PHP-SDK for integrating with EDB-BRUGS which is a platform used by the free schools in Denmark for managing students.
关键字:
README 文档
README
PHP 7 SDK to communicate with De frie skolers EDB-BRUGS.
Requirements
- Access to the programs from EDB-BRUGS.
- License for "Webtilmeldinger" (contact EDB-BRUGS support)
- EDB-BRUGS uses the new "stamdata" system
Getting started
The service communicates via SOAP to EDB-BRUGS. You are only able to create new registrations which has to manually manipulated and put into the correct courses using the EDB-BRUGS Windows program.
To get access to the service, you need to contact the support at EDB-BRUGS. You need following information:
- WSDL for the SOAP-service (append ?wsdl to the WSDL-endpoint you recieve from EDB-BRUGS)
- Username
- Password
- School Code
Installation
Composer
Simply add a dependency on lsolesen/edbbrugs-php-sdk to your project's composer.json file if you use Composer to manage the dependencies of your project. Here is a minimal example of a composer.json file that just defines a dependency on EDBBrugs-PHP-SDK:
{
"require": {
"lsolesen/edbbrugs-php-sdk": "0.2.*"
}
}
After running composer install, you can take advantage of Composer's autoloader in vendor/autoload.php.
Usage
<?php use EDBBrugs\Client; use EDBBrugs\Credentials; use EDBBrugs\RegistrationRepository; $soap = new \SoapClient('https://www.webtilmeldinger.dk/TilmeldingsFormularV2Ws/Service.asmx?wsdl', array('trace' => 1)); $credentials = new Credentials($username, $password, $school_code); $client = new Client($credentials, $soap); $registration_repository = new RegistrationRepository($client); // Add registrations. $registrations = array( array( 'Kartotek' => 'XX', // required - provided by the user of EDB-Brugs 'Kursus' => 'Vinterkursus 18/19', // required - name of the course // The following is available for Elev, Mor, Far, Voksen 'Elev.Fornavn' => 'Svend Aage', 'Elev.Efternavn' => 'Thomsen', 'Elev.Adresse' => 'Ørnebjergvej 28', 'Elev.Lokalby' => 'Grejs', 'Elev.Postnr' => '7100', 'Elev.Bynavn' => 'Vejle', 'Elev.CprNr' => '010119421942', 'Elev.Fastnet' => '75820811', 'Elev.FastnetBeskyttet' => 0, // 0 = No, 1 = Yes 'Elev.Mobil' => '75820811', 'Elev.MobilBeskyttet' => 0, // 0 = No, 1 = Yes 'Elev.Email' => 'kontor@vih.dk', 'Elev.Land' => 'Danmark', 'Elev.Notat' => 'Svend Aage Thomsen er skolens grundlægger', 'Elev.Linje' => 'Fodbold', // optional and specific for a student // You can add Far, Mor, Voksen - but only one of each 'Voksen.Fornavn' => 'Svend Aage', 'Voksen.Efternavn' => 'Thomsen', 'Voksen.Adresse' => 'Ørnebjergvej 28', 'Voksen.Lokalby' => 'Grejs', 'Voksen.Postnr' => '7100', 'Voksen.Bynavn' => 'Vejle', 'Voksen.Fastnet' => '75820811', 'Voksen.FastnetBeskyttet' => 0, // 0 = No, 1 = Yes 'Voksen.Mobil' => '75820811', 'Voksen.MobilBeskyttet' => 0, // 0 = No, 1 = Yes 'Voksen.Email' => 'kontor@vih.dk', 'Voksen.Land' => 'Danmark', ) ); $registration_repository->addRegistrations($registrations); // Get new registrations. $registration_repository->getNewRegistrations(); // Get handled registrations. $registration_repository->getHandledRegistrations(); ?>
If you need to put something into custom fields, you will have to do like this:
// Add registrations. $registrations = array( array( 'Kartotek' => 'XX', // required - provided by the user of EDB-Brugs 'EgneFelter.EgetFelt30' => '[Forening450l]12.12.2018 Web Ja' ) );
Testing
You can test the methods on the commandline, by running:
php vendor/bin/phpunit --exclude-group=IntegrationTest tests
If you want to test the integration, please create a ´phpunit.xml´ based on ´phpunit.dist.xml´ with the correct information for accesssing the service.
php vendor/bin/phpunit tests
During testing you need to manually delete the web registrations using the Windows EDB-BRUGS program. There is no way to delete using the SOAP webservice.
lsolesen/edbbrugs-php-sdk 适用场景与选型建议
lsolesen/edbbrugs-php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 270 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 02 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「webservice」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lsolesen/edbbrugs-php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lsolesen/edbbrugs-php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lsolesen/edbbrugs-php-sdk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Wrapper around PHP SoapClient class
Externalize Symfony VarDumper dumps
PHP implementation of GestPay (Banca Sella) Web Services
A PHP client for TNT Express National webservices
A library for EAN and ISBN name lookup and validation using the API on ean-search.org
PHP wrapper class for GLPI Webservice Plugin
统计信息
- 总下载量: 270
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-24