grant/powerschool-plugin-xml-builder
Composer 安装命令:
composer require grant/powerschool-plugin-xml-builder
包简介
Build a plugin XML file for PowerSchool fluently.
README 文档
README
A package to help build valid xml for a PowerSchool plugin.
Installation
composer require grantholle/powerschool-plugin-xml-builder
Usage
You can fluently build up the tags and attributes of your plugin to generate valid xml.
use GrantHolle\PowerSchool\Plugin\PluginXmlBuilder; use GrantHolle\PowerSchool\Plugin\UiContext; /** * @var string */ $output = (new PluginXmlBuilder) ->version('1.1.1') ->description('A simple plugin') ->name('Simple Plugin') ->publisher('Joe Montana', 'joe@nfl.com') ->openId('example.com', 8443) ->addOpenIdLink('My OpenID link', '/path', 'My OpenID title', [ UiContext::ADMIN_HEADER, UiContext::STUDENT_HEADER, ]) ->addLink('My link', 'http://example.com', 'My title', UiContext::GUARDIAN_HEADER) ->addAccessRequest('students', 'dcid') ->addAccessRequest('students', 'first_name', true) ->addAccessRequest('students', 'last_name', true) ->saml('mysaml', 'http://example.com/saml', 'http://example.com/', 'http://example.com/metadata') ->addSamlLink('SAML', 'http://example.com/saml/login', 'SAML SP', [ UiContext::ADMIN_HEADER, UiContext::ADMIN_LEFT_NAV, ]) ->addSamlAttribute('admin', 'firstName') ->addSamlAttribute('admin', 'lastName', 'altLastName', 'myvalue') ->addSamlAttribute('student', 'first_name', 'first') ->addSamlPermission('permission1', 'A sample permission', 'abc123') ->addSamlPermission('permission2', 'Another sample permission', 'def456') ->oauth() ->autoEnable() ->autoRegister() ->autoDeploy() ->cantDelete() // By default is "pretty" and validated ->create(); // Not pretty // ->create(false); // Not pretty or validated // ->create(false, false);
By default, the xml will be validated against the spec. If you'd like for it to not be "pretty," pass false to create().
The above snippet will generate the following plugin.xml:
<?xml version="1.0" encoding="UTF-8"?> <plugin xmlns="http://plugin.powerschool.pearson.com" version="1.1.1" name="Simple Plugin" description="A simple plugin" deletable="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://plugin.powerschool.pearson.com plugin.xsd"> <publisher name="Joe Montana"> <contact email="joe@nfl.com"/> </publisher> <oauth/> <openid host="example.com" port="8443"> <links> <link display-text="My OpenID link" path="/path" title="My OpenID title"> <ui_contexts> <ui_context id="admin.header"/> <ui_context id="student.header"/> </ui_contexts> </link> </links> </openid> <links> <link display-text="My link" path="http://example.com" title="My title"> <ui_contexts> <ui_context id="guardian.header"/> </ui_contexts> </link> </links> <access_request> <field table="students" field="dcid" access="ViewOnly"/> <field table="students" field="first_name" access="FullAccess"/> <field table="students" field="last_name" access="FullAccess"/> </access_request> <saml name="mysaml" entity-id="http://example.com/saml" base-url="http://example.com/" metadata-url="http://example.com/metadata"> <links> <link display-text="SAML" path="http://example.com/saml/login" title="SAML SP"> <ui_contexts> <ui_context id="admin.header"/> <ui_context id="admin.left_nav"/> </ui_contexts> </link> </links> <attributes> <user type="admin"> <attribute name="firstName"/> <attribute name="lastName" attribute-name="altLastName" attribute-value="myvalue"/> </user> <user type="student"> <attribute name="first_name" attribute-name="first"/> </user> </attributes> <permissions> <permission name="permission1" description="A sample permission" value="abc123"/> <permission name="permission2" description="Another sample permission" value="def456"/> </permissions> </saml> <autoinstall required="true"> <autoenable required="true"/> <autoregister required="true"/> <autoredeploy/> </autoinstall> </plugin>
License
grant/powerschool-plugin-xml-builder 适用场景与选型建议
grant/powerschool-plugin-xml-builder 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 08 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「powerschool」 「powerschool plugin」 「plugin.xml」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 grant/powerschool-plugin-xml-builder 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 grant/powerschool-plugin-xml-builder 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 grant/powerschool-plugin-xml-builder 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
A Laravel package to make interacting with PowerSchool less painful.
Authenticate your Laravel app with PowerSchool
Plugin for YOURLS. Default tools to use in some laemmi plugins
PowerSchool API Adapter for multiple PowerSchool instances management.
Allows polling user for event dates and times.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-08-13