flow php

UNIFIED DATA PROCESSING FRAMEWORK

composer require flow-php/etl ^0.10.0

Changelog

elephant
extract

Extracts

Read from various data sources.

arrow
transform

Transforms

Shape and optimize for your needs.

arrow
load

Loads

Store and secure in one of many available data sinks.

Examples:

Description

Stdout is a special type of filesystem allowing to write straight to stdout of the process.

Stdout is a write-only filesystem. It is not possible to read from it.

Its main purpose is to allow to allow web servers to stream data to the client without buffering it in memory.

Code

<?php

declare(strict_types=1);

use function Flow\Filesystem\DSL\{fstab, path, protocol};

require __DIR__ . '/../../../autoload.php';

$outputStream = fstab()->for(protocol('stdout'))->writeTo(path('stdout://'));

$outputStream->append("Files List\n\n");

foreach (fstab()->for(protocol('file'))->list(path(__DIR__ . '/*')) as $file) {
    $outputStream->append(($file->isFile() ? 'File' : 'Directory') . ': ' . $file->path->basename() . "\n");
}

$outputStream->close();

Contributors

Join us on GitHub external resource
scroll back to top