vfsStreamPrintVisitor
extends vfsStreamAbstractVisitor
in package
Visitor which traverses a content structure recursively to print it to an output stream.
Tags
Table of Contents
- $depth : mixed
- current depth in directory tree
- $out : mixed
- target to write output to
- __construct() : mixed
- constructor
- visit() : vfsStreamVisitor
- visit a content and process it
- visitBlockDevice() : vfsStreamPrintVisitor
- visit a block device and process it
- visitDirectory() : vfsStreamPrintVisitor
- visit a directory and process it
- visitFile() : vfsStreamPrintVisitor
- visit a file and process it
- printContent() : mixed
- helper method to print the content
Properties
$depth
current depth in directory tree
protected
mixed
$depth
Tags
$out
target to write output to
protected
mixed
$out
Tags
Methods
__construct()
constructor
public
__construct([resource $out = STDOUT ]) : mixed
If no file pointer given it will fall back to STDOUT.
Parameters
- $out : resource = STDOUT
-
optional
Tags
Return values
mixed —visit()
visit a content and process it
public
visit(vfsStreamContent $content) : vfsStreamVisitor
Parameters
- $content : vfsStreamContent
Tags
Return values
vfsStreamVisitor —visitBlockDevice()
visit a block device and process it
public
visitBlockDevice(vfsStreamBlock $block) : vfsStreamPrintVisitor
Parameters
- $block : vfsStreamBlock
Return values
vfsStreamPrintVisitor —visitDirectory()
visit a directory and process it
public
visitDirectory(vfsStreamDirectory $dir) : vfsStreamPrintVisitor
Parameters
- $dir : vfsStreamDirectory
Return values
vfsStreamPrintVisitor —visitFile()
visit a file and process it
public
visitFile(vfsStreamFile $file) : vfsStreamPrintVisitor
Parameters
- $file : vfsStreamFile
Return values
vfsStreamPrintVisitor —printContent()
helper method to print the content
protected
printContent(string $name) : mixed
Parameters
- $name : string