You are here

protected function vfsStreamWrapper::getContentOfType 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::getContentOfType()

returns content for given path but only when it is of given type

Parameters

string $path:

int $type:

Return value

vfsStreamContent

4 calls to vfsStreamWrapper::getContentOfType()
vfsStreamWrapper::createFile in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
creates a file at given path
vfsStreamWrapper::dir_opendir in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
opens a directory
vfsStreamWrapper::rmdir in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
removes a directory
vfsStreamWrapper::stream_open in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
open the stream

File

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

Class

vfsStreamWrapper
Stream wrapper to mock file system requests.

Namespace

org\bovigo\vfs

Code

protected function getContentOfType($path, $type) {
  $content = $this
    ->getContent($path);
  if (null !== $content && $content
    ->getType() === $type) {
    return $content;
  }
  return null;
}