abstract class vfsStreamAbstractVisitor in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitor.php \org\bovigo\vfs\visitor\vfsStreamAbstractVisitor
Abstract base class providing an implementation for the visit() method.
@since 0.10.0
Hierarchy
- class \org\bovigo\vfs\visitor\vfsStreamAbstractVisitor implements vfsStreamVisitor
Expanded class hierarchy of vfsStreamAbstractVisitor
See also
https://github.com/mikey179/vfsStream/issues/10
File
- vendor/
mikey179/ vfsStream/ src/ main/ php/ org/ bovigo/ vfs/ visitor/ vfsStreamAbstractVisitor.php, line 20
Namespace
org\bovigo\vfs\visitorView source
abstract class vfsStreamAbstractVisitor implements vfsStreamVisitor {
/**
* visit a content and process it
*
* @param vfsStreamContent $content
* @return vfsStreamVisitor
* @throws \InvalidArgumentException
*/
public function visit(vfsStreamContent $content) {
switch ($content
->getType()) {
case vfsStreamContent::TYPE_BLOCK:
$this
->visitBlockDevice($content);
break;
case vfsStreamContent::TYPE_FILE:
$this
->visitFile($content);
break;
case vfsStreamContent::TYPE_DIR:
if (!$content
->isDot()) {
$this
->visitDirectory($content);
}
break;
default:
throw new \InvalidArgumentException('Unknown content type ' . $content
->getType() . ' for ' . $content
->getName());
}
return $this;
}
/**
* visit a block device and process it
*
* @param vfsStreamBlock $block
* @return vfsStreamVisitor
*/
public function visitBlockDevice(vfsStreamBlock $block) {
return $this
->visitFile($block);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
vfsStreamAbstractVisitor:: |
public | function |
visit a content and process it Overrides vfsStreamVisitor:: |
|
vfsStreamAbstractVisitor:: |
public | function |
visit a block device and process it Overrides vfsStreamVisitor:: |
2 |
vfsStreamVisitor:: |
public | function | visit a directory and process it | 2 |
vfsStreamVisitor:: |
public | function | visit a file and process it | 2 |