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
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\vfsCode
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);
}