bamberjp / dmwsphp
DMWS-PHP 是一个库,旨在简化 PHP 开发者对 Digital Measures Web Services 平台的使用。
dev-master
2017-08-22 12:50 UTC
Requires
- php: >=5.3
- nategood/httpful: *
This package is not auto-updated.
Last update: 2024-09-29 02:26:54 UTC
README
DMWS-PHP 是一个库,旨在简化 PHP 开发者对 Digital Measures Web Services 平台的使用。该项目目前正在开发中,无法执行通过 REST API 可用的所有操作。
由 Feliciano 商学院赞助的项目。
依赖项
此库需要 Httful HTTP 客户端库。
入门
设置连接
$conn = new DMWSConnection("[USERNAME]", "[PASSWORD]");
或使用 BETA 环境
$conn = new DMWSConnection("[USERNAME]", "[PASSWORD]", false, true);
示例
获取架构资源
try { $ListResource = $conn->getSchema(); foreach($ListResource as $key => $SchemaResource) { print $SchemaResource->getText() . "<br>"; } } catch (Exception $e) { print $e; }
获取默认架构资源
try { $SchemaResource = $conn->getDefaultSchema(); print $SchemaResource->getText(); } catch (Exception $e) { print $e; }
架构实体资源
try { $SchemaEntityListResource = $conn->getDefaultSchema()->getSchemaEntities(); foreach ($SchemaEntityListResource as $View) { $SchemeEntityResources = $View->getSchemaEntityResources(); foreach ($SchemeEntityResources as $SchemaEntity) { print $SchemaEntity; } } } catch (Exception $e) { print $e; }
架构索引资源和索引条目
try { $SchemaIndexResources = $conn->getDefaultSchema()->getSchemaIndices(); foreach ($SchemaIndexResources as $SchemaIndexResource) { print $SchemaIndexResource; foreach ($SchemaIndexResource->getIndexEntries() as $IndexEntry) { print $IndexEntry; } } } catch (Exception $e) { print $e; }
PCI
try { $SchemaResource = $conn->getDefaultSchema(); $PCIRecords = $conn->getPCI($SchemaResource); foreach($PCIRecords as $Record) { print $Record . "<br>"; } } catch (Exception $e) { print $e; }
INTELLCONT
try { $SchemaResource = $conn->getDefaultSchema(); $INTELLCONTRecords = $conn->getINTELLCONT($SchemaResource); foreach($INTELLCONTRecords as $Record) { print $Record . "<br>"; $Authors = $Record->getAuthors(); foreach ($Authors as $Author) { print $Author; } } } catch (Exception $e) { print $e; }
变更日志
2017年8月22日:在 DMWSConnection 中的 getINTELLCONT() 函数中删除了错误参数。
支持
直接通过电子邮件 bamberjp@gmail.com 联系我以获得支持。请随意分享您如何在项目中使用此代码。