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

Breadcrumb

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

function StringBasedFileContent::doWrite

actual writing of data with specified length at given offset

Parameters

string $data:

int $offset:

int $length:

Overrides SeekableFileContent::doWrite

File

vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/StringBasedFileContent.php, line 73

Class

StringBasedFileContent
Default implementation for file contents based on simple strings.

Namespace

org\bovigo\vfs\content

Code

protected function doWrite($data, $offset, $length) {
    $this->content = substr($this->content, 0, $offset) . $data . substr($this->content, $offset + $length);
}

API Navigation

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