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

Breadcrumb

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

function PrettyPrinterAbstract::pImplode

Pretty prints an array of nodes and implodes the printed values.

Parameters

Node[] $nodes Array of Nodes to be printed:

string $glue Character to implode with:

Return value

string Imploded pretty printed nodes> $pre

5 calls to PrettyPrinterAbstract::pImplode()
PrettyPrinterAbstract::pCommaSeparated in vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php
Pretty prints an array of nodes and implodes the printed values with commas.
Standard::pIntersectionType in vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php
Standard::pStmt_Catch in vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php
Standard::pStmt_If in vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php
Standard::pStmt_TryCatch in vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php

File

vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php, line 465

Class

PrettyPrinterAbstract

Namespace

PhpParser

Code

protected function pImplode(array $nodes, string $glue = '') : string {
    $pNodes = [];
    foreach ($nodes as $node) {
        if (null === $node) {
            $pNodes[] = '';
        }
        else {
            $pNodes[] = $this->p($node);
        }
    }
    return implode($glue, $pNodes);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal