You are here

protected function S3fsStream::_trigger_error in S3 File System 8.2

Triggers one or more errors.

Parameters

string|array $errors: Errors to trigger.

mixed $flags: If set to STREAM_URL_STAT_QUIET, no error or exception is triggered.

Return value

bool Always returns FALSE.

Throws

RuntimeException If the 'throw_exceptions' option is TRUE.

5 calls to S3fsStream::_trigger_error()
S3fsStream::rename in src/StreamWrapper/S3fsStream.php
Support for rename().
S3fsStream::stream_flush in src/StreamWrapper/S3fsStream.php
Support for fflush(). Flush current cached stream data to a file in S3.
S3fsStream::stream_open in src/StreamWrapper/S3fsStream.php
Support for fopen(), file_get_contents(), file_put_contents() etc.
S3fsStream::unlink in src/StreamWrapper/S3fsStream.php
Support for unlink().
S3fsStream::_s3fs_get_object in src/StreamWrapper/S3fsStream.php
Try to fetch an object from the metadata cache.

File

src/StreamWrapper/S3fsStream.php, line 1534

Class

S3fsStream
Defines a Drupal s3fs (s3fs://) stream wrapper class.

Namespace

Drupal\s3fs\StreamWrapper

Code

protected function _trigger_error($errors, $flags = NULL) {
  if ($flags != STREAM_URL_STAT_QUIET) {
    if ($this
      ->_get_option('throw_exceptions')) {
      throw new RuntimeException(implode("\n", (array) $errors));
    }
    else {
      trigger_error(implode("\n", (array) $errors), E_USER_ERROR);
    }
  }
  $this->_error_state = TRUE;
  return FALSE;
}