You are here

protected function vfsStreamWrapper::getContent in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php \org\bovigo\vfs\vfsStreamWrapper::getContent()

returns content for given path

Parameters

string $path:

Return value

vfsStreamContent

8 calls to vfsStreamWrapper::getContent()
vfsStreamWrapper::doPermChange in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
executes given permission change when necessary rights allow such a change
vfsStreamWrapper::doUnlink in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
removes a path
vfsStreamWrapper::getContentOfType in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
returns content for given path but only when it is of given type
vfsStreamWrapper::mkdir in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
creates a new directory
vfsStreamWrapper::rename in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
rename from one path to another

... See full list

File

vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php, line 185

Class

vfsStreamWrapper
Stream wrapper to mock file system requests.

Namespace

org\bovigo\vfs

Code

protected function getContent($path) {
  if (null === self::$root) {
    return null;
  }
  if (self::$root
    ->getName() === $path) {
    return self::$root;
  }
  if ($this
    ->isInRoot($path) && self::$root
    ->hasChild($path) === true) {
    return self::$root
      ->getChild($path);
  }
  return null;
}