Dumps the service container.

@param array $options An array of options

@return string The representation of the service container
484555
public function dump(array $options = [])
    {
        $compiled = false;
        if (isset($options['do_compile']) && true === $options['do_compile']) {
            $this->container->compile();
            $compiled = true;
        }

        $dumper = [
            'parameters'    => $this->dumpContainerParameters($options),
            'services'      => $this->dumpContainerDefinitions($options),
            'aliases'       => $this->dumpContainerAliases($options),
            'is_compiled'   => $compiled,
        ];

        return serialize($dumper);
    }
455222
public static function dump(array $parameters)
    {
        $content = '';

        foreach ($parameters as $key => $value) {
            if (is_bool($value)) {
                $value = $value ? 'true' : 'false';
            }
            $content .= "{$key} = {$value}\n";
        }

        return $content;
    }
1018386
public function render(array $options = []): string
    {
        $html = $this->format['menuStart'];
        $html .= !empty($options['title']) ? $options['title'] : '';

        /**
         * @var MenuItemInterface $menuItem
         */
        foreach ($this->menu->getMenuItems() as $menuItem) {
            if ($menuItem->isEnabled()) {
                $html .= $this->renderMenuItem($menuItem);
            }
        }
        $html .= $this->format['menuEnd'];

        return $html;
    }
598633
public function dumpDiActionGet() : array
    {
        // Deal with the action and return a response.
        $services = implode(", ", $this->di->getServices());
        $json = [
            "message" => __METHOD__ . "<p>\$di contains: $services",
            "di" => $this->di->getServices(),
        ];
        return [$json];
    }
114263
private function dumpContainerAliases(array $options)
    {
        $aliases = [];
        foreach ($this->container->getAliases() as $id => $alias) {
            $aliases[$id] = $alias->__toString();
        }

        return $aliases;
    }
44051
public static function export($options)
    {
        $defaults = [
            'collector' => null,
            'time'      => time(),
            'base_path' => getcwd()
        ];
        $options += $defaults;

        $collector = $options['collector'];

        $xmlDocument = new DOMDocument('1.0', 'UTF-8');
        $xmlDocument->formatOutput = true;

        $xmlCoverage = $xmlDocument->createElement('coverage');
        $xmlCoverage->setAttribute('generated', $options['time']);
        $xmlDocument->appendChild($xmlCoverage);

        $xmlProject = $xmlDocument->createElement('project');
        $xmlProject->setAttribute('timestamp', $options['time']);
        $xmlCoverage->appendChild($xmlProject);

        $base = $options['base_path'] ? rtrim($options['base_path'], DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR : '';

        foreach ($collector->export() as $file => $data) {
            $xmlProject->appendChild(static::_exportFile($xmlDocument, $base . $file, $data));
        }
        $xmlProject->appendChild(static::_exportMetrics($xmlDocument, $collector->metrics()));
        return $xmlDocument->saveXML();
    }
196261
public function save(array $options = [])
    {
        $this->attributes['slug'] = str_slug($this->attributes['name']);

        return parent::save($options);
    }
1069863
public static function dump($var, array $options = null)
    {
        if (Helpers::isHtmlMode()) {
            echo self::toHtml($var, $options);
        } elseif (self::detectColors()) {
            echo self::toTerminal($var, $options);
        } else {
            echo self::toText($var, $options);
        }

        return $var;
    }
154496
def dump_soap_options(options)
      @soap_dump     = true
      @soap_dump_log = nil

      if options[:directory]
        @soap_dump_dir = options[:directory]
      else
        @soap_dump_log = File.open(options[:file], "w")
      end
      @soap_dump_format = false || options[:format]

      @soap_dump_interceptor = options[:interceptor] if options[:interceptor]
    end
894169
public function save(array $options = [])
    {
        $data = $this->serialize();

        $this->security->getKuzzle()->query(
            $this->security->buildQueryArgs($this->saveActionName),
            $data,
            $options
        );

        return $this;
    }
354428
public function dump(ServerInterface $server, $spaces = 0)
    {
        $config = '';

        foreach ($this->directives as $directive) {
            $config .= $directive->dump($server, $spaces + ($this->isMainContext() ? 0 : 4));
        }

        return $this->dumpBlock($server->getDumperStartDirective(), $spaces).
            $config.
            $this->dumpBlock($server->getDumperEndDirective(), $spaces);
    }
467973
protected function performSave(array $options) {

        if ($this->autoPurgeRedundantAttributes) {
            $this->attributes = $this->purgeArray($this->getAttributes());
        }

        if ($this->autoHashPasswordAttributes) {
            $this->attributes = $this->hashPasswordAttributes($this->getAttributes(), static::$passwordAttributes);
        }

        return parent::save($options);
    }
13948
public static function export($options)
    {
        $defaults = [
            'collector' => null,
            'base_path' => getcwd()
        ];
        $options += $defaults;

        $collector = $options['collector'];

        $export = [];

        $base = $options['base_path'] ? rtrim($options['base_path'], DS) . DS : '';

        foreach ($collector->export() as $file => $coverage) {
            $path = $base . $file;
            $export[$path] = static::_export($path, $collector->parse($file), $coverage);
        }

        return json_encode($export);
    }
440408
public function export($options = [])
    {
        $this->_setContentLength();

        return [
            'method'   => $this->method(),
            'scheme'   => $this->scheme(),
            'version'  => $this->version(),
            'hostname' => $this->hostname(),
            'port'     => $this->port(),
            'path'     => $this->path(),
            'query'    => $this->query() ? '?' . http_build_query($this->query()) : '',
            'fragment' => $this->fragment(),
            'username' => $this->username(),
            'password' => $this->password(),
            'url'      => $this->url()
        ];
    }
1014030
public function dump($all = false)
    {
        if ($all) {
            return $this->data;
        }

        $data = [];

        foreach (array_keys($this->getFields()) as $field) {
            $data[$field] = $this->data[$field];
        }

        return $data;
    }
612549
public function toJSON($options = 0)
    {
        // Because of PHP Version 5.3, we cannot use JSON_UNESCAPED_SLASHES option
        // Instead we would use the str_replace command for now.
        if (version_compare(phpversion(), '5.4.0', '>=') === true) {
            return json_encode($this->toArray(), $options | 64);
        }
        return str_replace('\\/', '/', json_encode($this->toArray(), $options));
    }
1312254
protected function convertWriteTimeout(array $options)
    {
        if (isset($options['wtimeout']) && ! isset($options['wTimeoutMS'])) {
            $options['wTimeoutMS'] = $options['wtimeout'];
            unset($options['wtimeout']);
        }

        return $options;
    }