PHP code example of sendwavehub / flowdoc

1. Go to this page and download the library: Download sendwavehub/flowdoc library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sendwavehub / flowdoc example snippets


use Flowdoc\NativeParser;

$records = NativeParser::parseFlow("Record\n  id: 1\n  name: Test\n");
// [['id' => '1', 'name' => 'Test']]

use Flowdoc\Flowb;

Flowb::saveFlowb('data.flowb', [['id' => '1', 'name' => 'Test']]);
$records = Flowb::loadFlowb('data.flowb');
// [['id' => '1', 'name' => 'Test']]

use Flowdoc\NativeParser;

$flowc = NativeParser::writeFlowCompact([['id' => '1', 'name' => 'Test']]);
// "id:1\nname:Test"
$records = NativeParser::parseFlowCompact($flowc);
// [['id' => '1', 'name' => 'Test']]

use Flowdoc\License;

$status = License::status();
// ['checked' => true, 'valid' => true|false|null, 'error' => string|null]

use Flowdoc\License;

$result = License::activate('install-script');
// ['success' => true, 'error' => null, 'message' => ..., 'tier' => ..., 'seats' => ...,
//  'expiresAt' => ..., 'customerId' => ..., 'signedLicenseArtifact' => ...]
// or, on failure: ['success' => false, 'error' => '...', ...other fields null]
bash
composer install
php -d ffi.enable=1 vendor/bin/phpunit tests/