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

Breadcrumb

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

function vfsStream::inspect

use visitor to inspect a content structure

If the given content is null it will fall back to use the current root directory of the stream wrapper.

Returns given visitor for method chaining comfort.

@since 0.10.0

Parameters

vfsStreamVisitor $visitor the visitor who inspects:

vfsStreamContent $content directory structure to inspect:

Return value

vfsStreamVisitor

Throws

\InvalidArgumentException

See also

https://github.com/mikey179/vfsStream/issues/10

File

vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStream.php, line 424

Class

vfsStream
Some utility methods for vfsStream.

Namespace

org\bovigo\vfs

Code

public static function inspect(vfsStreamVisitor $visitor, ?vfsStreamContent $content = null) {
    if (null !== $content) {
        return $visitor->visit($content);
    }
    $root = vfsStreamWrapper::getRoot();
    if (null === $root) {
        throw new \InvalidArgumentException('No content given and no root directory set.');
    }
    return $visitor->visitDirectory($root);
}

API Navigation

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