Download the PHP package notifius/php-wctp without Composer
On this page you can find all versions of the php package notifius/php-wctp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download notifius/php-wctp
More information about notifius/php-wctp
Files in notifius/php-wctp
Package php-wctp
Short Description A PHP library for creating and handling XML request/response objects for the WCTP v1.3r1 specification.
License MIT
Homepage https://github.com/notifius/php-wctp
Informations about the package php-wctp
php-wctp
A PHP library for creating and submitting XML WCTP requests and responses
Not production ready
Not ready for every day use! We will tag a version 1.0.0 when we're ready for you to use in production. For now, expect namespace updates and other breaking changes.
Getting Started
Install the library using composer:
Example use of library:
XML Request Method Templating
WCTP Method | notifius/wctp | Status |
---|---|---|
wctp-ClientQuery | NotifiUs\WCTP\XML\ClientQuery | ✓ |
wctp-LookupSubscriber | NotifiUs\WCTP\XML\LookupSubscriber | ✓ |
wctp-DeviceLocation | NotifiUs\WCTP\XML\DeviceLocation | ✓ |
wctp-MessageReply | NotifiUs\WCTP\XML\MessageReply | ✓ |
wctp-PollForMessages | NotifiUs\WCTP\XML\PollForMessages | × |
wctp-ReturnToSvc | NotifiUs\WCTP\XML\ReturnToSvc | ✓ |
wctp-SendMsgMulti | NotifiUs\WCTP\XML\SendMsgMulti | × |
wctp-StatusInfo | NotifiUs\WCTP\XML\StatusInfo | × |
wctp-SubmitClientMessage | NotifiUs\WCTP\XML\SubmitClientMessage | ✓ |
wctp-SubmitRequest | NotifiUs\WCTP\XML\SubmitRequest | ✓ |
wctp-VersionQuery | NotifiUs\WCTP\XML\VersionQuery | ✓ |
General Information
Dates
We rely on the nesbot/carbon
composer package for handling dates throughout our library.
Add WCTP token to wctp-Operation
For all XML WCTP methods below, you can optionally pass in a wctpToken
to the constructor:
This will add the XML attribute wctpToken="token"
to the <wctp-Operation>
element.
Return Type
The $xml
variable will be a SimpleXMLElement Object. You can get the XML as a string by calling $xml->asXML()
Relaxed parameter requirements
While we follow the WCTP recommendations for parameters and lengths, we don't enforce allowed characters. Anything that is not XML compliant will be automatically escaped, so keep that in mind. This should provide an additional level of flexibility (through conventions) and modernize the now ~15 year-old protocol.
WCTP XML Methods
wctp-MessageReply
Create an XML representation of the wctp-MessageReply operation.
wctp-ClientQuery
Create an XML representation of the wctp-ClientQuery operation.
wctp-VersionQuery
Create an XML representation of the wctp-VersionQuery operation.
You can also leave off optional parameters like this:
License
The php-wctp library is open-source software licensed under the MIT license.
Testing
After cloning the repository and running composer install
, you can run the test suite like this:
Security Vulnerabilities
If you discover a security vulnerability, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.