承接 roblib/rapidillrequest 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

roblib/rapidillrequest

Composer 安装命令:

composer require roblib/rapidillrequest

包简介

PHP library for creating InterLibrary Loan requests via the RapidILL API

README 文档

README

A PHP library for creating InterLibrary Loan (ILL) requests using the RapidILL API InsertRequest method.

Built on PHP's native SoapClient with no framework dependencies, making it easy to use in any PHP project including Drupal 10.

Requirements

  • PHP 8.1 or higher
  • PHP SOAP extension (ext-soap)

Installation

Composer

composer require roblib/rapidillrequest

Drupal 10

composer require roblib/rapidillrequest

Quick Start

use RapidIll\RapidIllClient;
use RapidIll\InsertRequest;
use RapidIll\RequestType;

// Create a client with your RapidILL credentials.
$client = new RapidIllClient(
    username: 'your_username',
    password: 'your_password',
    rapidCode: 'YOUR_RAPID_CODE',
    branchName: 'Main',
);

// Build and submit a request.
$request = (new InsertRequest())
    ->setRequestType(RequestType::Article)
    ->setJournalTitle('Nature')
    ->setArticleTitle('A breakthrough in quantum computing')
    ->setArticleAuthor('Smith, J.')
    ->addIssn('0028-0836');

$response = $client->insertRequest($request);

if ($response->isSuccessful) {
    echo "Request submitted. Rapid ID: {$response->rapidRequestId}\n";
}

Examples

Request a journal article

use RapidIll\RapidIllClient;
use RapidIll\InsertRequest;
use RapidIll\RequestType;

$client = new RapidIllClient(
    username: 'your_username',
    password: 'your_password',
    rapidCode: 'YOUR_RAPID_CODE',
    branchName: 'Main',
);

$request = (new InsertRequest())
    ->setRequestType(RequestType::Article)
    ->setJournalTitle('Nature')
    ->setJournalYear('2024')
    ->setJournalVolume('625')
    ->setJournalIssue('7994')
    ->setJournalMonth('January')
    ->setArticleTitle('A breakthrough in quantum computing')
    ->setArticleAuthor('Smith, J.')
    ->setArticlePages('100-105')
    ->addIssn('0028-0836')
    ->addIssn('1476-4687')
    ->setOclcNumber('1234567')
    ->setPatronName('Jane Doe')
    ->setPatronEmail('jane.doe@university.edu')
    ->setPatronDepartment('Physics')
    ->setXrefRequestId('ILL-2024-00042');

$response = $client->insertRequest($request);

if ($response->isSuccessful) {
    echo "Request ID: {$response->rapidRequestId}\n";
    echo "Match found: " . ($response->foundMatch ? 'yes' : 'no') . "\n";
    echo "Available holdings: {$response->numberOfAvailableHoldings}\n";
} else {
    echo "Request failed: {$response->verificationNote}\n";
}

Request a book

$request = (new InsertRequest())
    ->setRequestType(RequestType::Book)
    ->setJournalTitle('Introduction to Algorithms')
    ->setArticleAuthor('Cormen, Thomas H.')
    ->addIsbn('978-0262033848')
    ->setPublisher('MIT Press')
    ->setEdition('3rd')
    ->setPatronName('John Smith')
    ->setPatronEmail('john.smith@university.edu');

$response = $client->insertRequest($request);

Request a book chapter

$request = (new InsertRequest())
    ->setRequestType(RequestType::BookChapter)
    ->setJournalTitle('The Oxford Handbook of Innovation')
    ->setArticleTitle('Open Innovation')
    ->setArticleAuthor('Chesbrough, Henry')
    ->setArticlePages('191-213')
    ->addIsbn('978-0199286805')
    ->setPatronName('Alice Johnson')
    ->setPatronEmail('alice@university.edu');

$response = $client->insertRequest($request);

Check holdings only (without submitting a request)

$request = (new InsertRequest())
    ->setRequestType(RequestType::Article)
    ->setHoldingsCheckOnly(true)
    ->setJournalTitle('Science')
    ->addIssn('0036-8075');

$response = $client->insertRequest($request);

if ($response->isLocalHolding) {
    echo "Item is available locally:\n";
    foreach ($response->localHoldings as $holding) {
        echo "  Branch: {$holding['branchName']}\n";
        echo "  Location: {$holding['location']}\n";
        echo "  Call Number: {$holding['callNumber']}\n";
    }
} else {
    echo "Not held locally. {$response->numberOfAvailableHoldings} remote holdings available.\n";
}

Error handling

use RapidIll\RapidIllException;

try {
    $response = $client->insertRequest($request);
} catch (RapidIllException $e) {
    // SOAP or connection error.
    error_log('RapidILL error: ' . $e->getMessage());
}

Debugging SOAP requests

The client records the raw SOAP XML when trace is enabled (the default):

$response = $client->insertRequest($request);

// Inspect the XML that was sent and received.
echo $client->getLastRequest();
echo $client->getLastResponse();

API Reference

RapidIllClient

Constructor ParameterTypeRequiredDescription
usernamestringyesRapidILL API username
passwordstringyesRapidILL API password
rapidCodestringyesYour library's Rapid code
branchNamestringyesYour library branch name
wsdlUrlstringnoOverride the default WSDL URL
soapOptionsarraynoAdditional options passed to SoapClient

InsertRequest

All setters return $this for fluent chaining.

MethodDescription
setRequestType(RequestType)Article, Book, or BookChapter (default: Article)
setHoldingsCheckOnly(bool)If true, only checks holdings without submitting
setBlockLocalOnly(bool)Block request if only local holdings exist
setInsertLocalHolding(bool)Insert a local holding record
addIssn(string)Add an ISSN
setIssns(array)Set all ISSNs at once
addIsbn(string)Add an ISBN
setIsbns(array)Set all ISBNs at once
addLccn(string)Add an LCCN
setLccns(array)Set all LCCNs at once
setOclcNumber(string)OCLC number
setJournalTitle(string)Journal or book title
setJournalYear(string)Publication year
setJournalVolume(string)Volume number
setJournalIssue(string)Issue number
setJournalMonth(string)Publication month
setArticleTitle(string)Article or chapter title
setArticleAuthor(string)Author name
setArticlePages(string)Page range
setEdition(string)Edition
setPublisher(string)Publisher
setPatronId(string)Patron identifier
setPatronName(string)Patron full name
setPatronDepartment(string)Patron department
setPatronEmail(string)Patron email address
setPatronPhone(string)Patron phone number
setPatronNotes(string)Additional notes
setXrefRequestId(string)Cross-reference ID from your ILL system

InsertResponse

All properties are readonly.

PropertyTypeDescription
isSuccessfulboolWhether the API call succeeded
foundMatchboolWhether a lending match was found
rapidRequestIdintThe assigned Rapid request ID
numberOfAvailableHoldingsintCount of available holdings
isLocalHoldingboolWhether the item is held locally
verificationNote?stringError or informational message
matchingStandardNumber?stringThe matched ISSN/ISBN
matchingStandardNumberType?stringType of the matched number
duplicateRequestId?stringID if request is a duplicate
localHoldingsarrayArray of local holding records

RequestType (enum)

  • RequestType::Article
  • RequestType::Book
  • RequestType::BookChapter

Testing

composer install
vendor/bin/phpunit

License

GPL-2.0-or-later

roblib/rapidillrequest 适用场景与选型建议

roblib/rapidillrequest 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 roblib/rapidillrequest 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 roblib/rapidillrequest 我们能提供哪些服务?
定制开发 / 二次开发

基于 roblib/rapidillrequest 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-03-25