lv / aurorajson
Library to handle an AWS-Subscription from a woodwing publication, download and transform data from JSON to PHP Array.
Requires
- ext-json: *
- aws/aws-php-sns-message-validator: ^1.8
- galbar/jsonpath: ^3
- guzzlehttp/guzzle: ^7.4
- hassankhan/config: ^3
- monolog/monolog: ^3.4
- slowprog/composer-copy-file: ^0.3
This package is auto-updated.
Last update: 2025-03-07 10:57:52 UTC
README
Library to handle an AWS subscription from a Woodwing Aurora publication, download and transform data from JSON to a customizable PHP array.
Woodwing Aurora is a Multi-Channel-Publishing plattform to aim the goal "write once, publish anywhere". Aurora publishes its content in different formats like HTML, PSV and JSON. This library concentrate on custom transformation of the proprietary Aurora JSON format to an PHP array.
You find additional Information about the JSON-Format: https://helpcenter.woodwing.com/hc/en-us/articles/360000130186-The-JSON-Digital-article-format-specification
Requirements
- PHP >= 7.2.5
Installation
composer require lv/aurorajson:dev-master
Configure a Publication Channel in Woodwing Aurora.
Setup a website to get publication data from Woodwing Aurora. You find in public/index.php the stuff to handle AWSSubscription and trigger the JSON transformation process. You find rules for the transformation process in config/config.json. See the usage section.
Usage
In public/index.php is the part to handle AWSSubscription and trigger the PHP Array Transformation:
/* Download Manager is responsible to get article data from AWS-Cloud */
$aDownload = new DownloadManager($configData);
$aDownload->handleAwsSnsMessage();
if ($aDownload->isDownloadSuccess()) {
$artDao = new ArticleManager($configData);
$articleData = $artDao->parseJsonData($aDownload->getArticleJsonData());
}