Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. vfsStreamAbstractContent.php

function 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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal