Download the PHP
package icecave/duct without Composer
On this page you can find all versions of the php package
icecave/duct. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Duct is a PHP library for incrementally parsing continuous streams of JSON values.
composer require icecave/duct
Duct is designed to parse sequential JSON values from data streams, without framing or demarcation outside of the
JSON specification.
Examples
Simple parsing
Duct can be used to parse multiple JSON documents in a single call to Parser::parse().
The JSON string given must contain complete values.
Incremental parsing
Asynchronous, incremental parsing is also possible using the Parser::feed(), values() and finalize() methods.
Event-based parsing
Duct also provides EventedParser, an event-based incremental parser similar to the Clarinet
library for JavaScript. Event management is provided by Événement, a popular PHP
event library.
As per the example above the feed() and finalize() methods are used, however there is no values() method. Instead,
the following events are emitted as the buffer is parsed.
document-open: emitted when a JSON document is begun
document-close: emitted after an entire JSON document has been parsed
array-open: emitted when an array open bracket is encountered
array-close: emitted when an array closing bracket is encountered
object-open: emitted when an object open brace is encountered
object-close: emitted when an object closing brace is encountered
object-key (string $key): emitted when an object key is encountered
value (mixed $value): emitted whenever a scalar or null is encountered, including inside objects and arrays
error (Exception $error): emitted when a syntax error is encountered
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package icecave/duct contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.