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

Breadcrumb

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

function vfsStreamFile::getResourceId

Returns unique resource id

Parameters

resource|vfsStreamWrapper $resource:

Return value

string

See also

https://github.com/mikey179/vfsStream/issues/40

2 calls to vfsStreamFile::getResourceId()
vfsStreamFile::hasExclusiveLock in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamFile.php
checks whether file is locked in exclusive mode
vfsStreamFile::setExclusiveLock in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamFile.php
Set exlusive lock on file by given resource

File

vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamFile.php, line 368

Class

vfsStreamFile
File container.

Namespace

org\bovigo\vfs

Code

public function getResourceId($resource) {
    if (is_resource($resource)) {
        $data = stream_get_meta_data($resource);
        $resource = $data['wrapper_data'];
    }
    return spl_object_hash($resource);
}

API Navigation

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