PHP code example of notioncommotion / stream-parser

1. Go to this page and download the library: Download notioncommotion/stream-parser 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/ */

    

notioncommotion / stream-parser example snippets


$stream=new NotionCommotion\StreamParser\ServerStreamParser(
    React\Stream\DuplexStreamInterface $stream,
    NotionCommotion\StreamParser\Encoders\EncoderInterface $encoder,
    [NotionCommotion\StreamParser\Serializer\SerializerInterface $serializer],
    array $settings
);
 server.php

$stream=new NotionCommotion\StreamParser\StreamParser(
    React\Stream\DuplexStreamInterface $stream,
    NotionCommotion\StreamParser\Encoders\EncoderInterface $encoder,
    NotionCommotion\StreamParser\Serializer\SerializerInterface $serializer,
    array $settings
);
 client.php