public function MimeStreamWrapper::stream_open in UIkit Components 8.3
Parameters
$path:
$mode:
$options:
$opened_path:
Return value
bool
File
- src/
MimeStreamWrapper.php, line 142
Class
- MimeStreamWrapper
- Provides a stream wrapper to retrieve mime type information from any source.
Namespace
Drupal\uikit_componentsCode
public function stream_open($path, $mode, $options, &$opened_path) {
if (!preg_match('/^r[bt]?$/', $mode) || !$this->context) {
return FALSE;
}
$opt = stream_context_get_options($this->context);
if (!is_array($opt[self::WRAPPER_NAME]) || !isset($opt[self::WRAPPER_NAME]['cb']) || !is_callable($opt[self::WRAPPER_NAME]['cb'])) {
return FALSE;
}
$this->callBackFunction = $opt[self::WRAPPER_NAME]['cb'];
$this->fileStat = $opt[self::WRAPPER_NAME]['fileStat'];
return TRUE;
}