403Webshell
Server IP : 213.136.93.164  /  Your IP : 216.73.216.75
Web Server : Apache
System : Linux m14200.contabo.net 5.14.0-611.54.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 6 18:03:03 EDT 2026 x86_64
User : ki692510 ( 1047)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/react/stream/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/react/stream/src/Util.php
<?php

namespace RectorPrefix202411\React\Stream;

final class Util
{
    /**
     * Pipes all the data from the given $source into the $dest
     *
     * @param ReadableStreamInterface $source
     * @param WritableStreamInterface $dest
     * @param array $options
     * @return WritableStreamInterface $dest stream as-is
     * @see ReadableStreamInterface::pipe() for more details
     */
    public static function pipe(ReadableStreamInterface $source, WritableStreamInterface $dest, array $options = array())
    {
        // source not readable => NO-OP
        if (!$source->isReadable()) {
            return $dest;
        }
        // destination not writable => just pause() source
        if (!$dest->isWritable()) {
            $source->pause();
            return $dest;
        }
        $dest->emit('pipe', array($source));
        // forward all source data events as $dest->write()
        $source->on('data', $dataer = function ($data) use($source, $dest) {
            $feedMore = $dest->write($data);
            if (\false === $feedMore) {
                $source->pause();
            }
        });
        $dest->on('close', function () use($source, $dataer) {
            $source->removeListener('data', $dataer);
            $source->pause();
        });
        // forward destination drain as $source->resume()
        $dest->on('drain', $drainer = function () use($source) {
            $source->resume();
        });
        $source->on('close', function () use($dest, $drainer) {
            $dest->removeListener('drain', $drainer);
        });
        // forward end event from source as $dest->end()
        $end = isset($options['end']) ? $options['end'] : \true;
        if ($end) {
            $source->on('end', $ender = function () use($dest) {
                $dest->end();
            });
            $dest->on('close', function () use($source, $ender) {
                $source->removeListener('end', $ender);
            });
        }
        return $dest;
    }
    public static function forwardEvents($source, $target, array $events)
    {
        foreach ($events as $event) {
            $source->on($event, function () use($event, $target) {
                $target->emit($event, \func_get_args());
            });
        }
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit