Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ServerDumper.php

class ServerDumper

ServerDumper forwards serialized Data clones to a server.

@author Maxime Steinhausser <maxime.steinhausser@gmail.com>

Hierarchy

  • class \Symfony\Component\VarDumper\Dumper\ServerDumper implements \Symfony\Component\VarDumper\Dumper\DataDumperInterface

Expanded class hierarchy of ServerDumper

1 file declares its use of ServerDumper
VarDumper.php in vendor/symfony/var-dumper/VarDumper.php

File

vendor/symfony/var-dumper/Dumper/ServerDumper.php, line 23

Namespace

Symfony\Component\VarDumper\Dumper
View source
class ServerDumper implements DataDumperInterface {
    private Connection $connection;
    
    /**
     * @param string                     $host             The server host
     * @param DataDumperInterface|null   $wrappedDumper    A wrapped instance used whenever we failed contacting the server
     * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name
     */
    public function __construct(string $host, ?DataDumperInterface $wrappedDumper = null, array $contextProviders = []) {
        $this->connection = new Connection($host, $contextProviders);
    }
    public function getContextProviders() : array {
        return $this->connection
            ->getContextProviders();
    }
    public function dump(Data $data) : ?string {
        if (!$this->connection
            ->write($data) && $this->wrappedDumper) {
            return $this->wrappedDumper
                ->dump($data);
        }
        return null;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ServerDumper::$connection private property
ServerDumper::dump public function Overrides DataDumperInterface::dump
ServerDumper::getContextProviders public function
ServerDumper::__construct public function
RSS feed
Powered by Drupal