You are here

public function vfsStreamAbstractContent::appliesTo in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php \org\bovigo\vfs\vfsStreamAbstractContent::appliesTo()

checks whether the container can be applied to given name

Parameters

string $name:

Return value

bool

Overrides vfsStreamContent::appliesTo

1 call to vfsStreamAbstractContent::appliesTo()
vfsStreamDirectory::getRealChildName in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamDirectory.php
helper method to detect the real child name
1 method overrides vfsStreamAbstractContent::appliesTo()
vfsStreamFile::appliesTo in vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamFile.php
checks whether the container can be applied to given name

File

vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php, line 127

Class

vfsStreamAbstractContent
Base stream contents container.

Namespace

org\bovigo\vfs

Code

public function appliesTo($name) {
  if ($name === $this->name) {
    return true;
  }
  $segment_name = $this->name . '/';
  return strncmp($segment_name, $name, strlen($segment_name)) == 0;
}