Final Class Yiisoft\Yii\Debug\Collector\Stream\FilesystemStreamProxy
| Inheritance | Yiisoft\Yii\Debug\Collector\Stream\FilesystemStreamProxy |
|---|---|
| Implements | Yiisoft\Yii\Debug\Helper\StreamWrapper\StreamWrapperInterface |
Public Properties
Public Methods
Property Details
Method Details
| public mixed __call ( string $name, array $arguments ) | ||
| $name | string | |
| $arguments | array | |
public function __call(string $name, array $arguments)
{
try {
self::unregister();
return $this->decorated->{$name}(...$arguments);
} finally {
self::register();
}
}
| public mixed __construct ( ) |
public function __construct()
{
$this->decorated = new StreamWrapper();
$this->decorated->context = $this->context;
}
| public mixed __destruct ( ) |
public function __destruct()
{
if (self::$collector === null) {
return;
}
foreach ($this->operations as $name => $operation) {
self::$collector->collect(
operation: $name,
path: $operation['path'],
args: $operation['args'],
);
}
self::unregister();
}
| public mixed __get ( string $name ) | ||
| $name | string | |
public function __get(string $name)
{
return $this->decorated->{$name};
}
| public boolean dir_closedir ( ) |
public function dir_closedir(): bool
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean dir_opendir ( string $path, integer $options ) | ||
| $path | string | |
| $options | integer | |
public function dir_opendir(string $path, int $options): bool
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public false|string dir_readdir ( ) |
public function dir_readdir(): false|string
{
if (!$this->ignored) {
$this->operations['readdir'] = [
'path' => $this->decorated->filename ?? '',
'args' => [],
];
}
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean dir_rewinddir ( ) |
public function dir_rewinddir(): bool
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean mkdir ( string $path, integer $mode, integer $options ) | ||
| $path | string | |
| $mode | integer | |
| $options | integer | |
public function mkdir(string $path, int $mode, int $options): bool
{
if (!$this->isIgnored()) {
$this->operations['mkdir'] = [
'path' => $path,
'args' => [
'mode' => $mode,
'options' => $options,
],
];
}
return $this->__call(__FUNCTION__, func_get_args());
}
| public static void register ( ) |
public static function register(): void
{
if (self::$registered) {
return;
}
/**
* It's important to trigger autoloader before unregistering the file stream handler
*/
class_exists(BacktraceMatcher::class);
class_exists(StreamWrapper::class);
class_exists(CombinedRegexp::class);
class_exists(StringHelper::class);
stream_wrapper_unregister('file');
stream_wrapper_register('file', self::class, STREAM_IS_URL);
self::$registered = true;
}
| public boolean rename ( string $path_from, string $path_to ) | ||
| $path_from | string | |
| $path_to | string | |
public function rename(string $path_from, string $path_to): bool
{
if (!$this->isIgnored()) {
$this->operations['rename'] = [
'path' => $path_from,
'args' => [
'path_to' => $path_to,
],
];
}
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean rmdir ( string $path, integer $options ) | ||
| $path | string | |
| $options | integer | |
public function rmdir(string $path, int $options): bool
{
if (!$this->isIgnored()) {
$this->operations['rmdir'] = [
'path' => $path,
'args' => [
'options' => $options,
],
];
}
return $this->__call(__FUNCTION__, func_get_args());
}
| public mixed stream_cast ( integer $castAs ) | ||
| $castAs | integer | |
public function stream_cast(int $castAs)
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public void stream_close ( ) |
public function stream_close(): void
{
$this->__call(__FUNCTION__, func_get_args());
}
| public boolean stream_eof ( ) |
public function stream_eof(): bool
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean stream_flush ( ) |
public function stream_flush(): bool
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean stream_lock ( integer $operation ) | ||
| $operation | integer | |
public function stream_lock(int $operation): bool
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean stream_metadata ( string $path, integer $option, mixed $value ) | ||
| $path | string | |
| $option | integer | |
| $value | mixed | |
public function stream_metadata(string $path, int $option, mixed $value): bool
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean stream_open ( string $path, string $mode, integer $options, string|null &$opened_path ) | ||
| $path | string | |
| $mode | string | |
| $options | integer | |
| $opened_path | string|null | |
public function stream_open(string $path, string $mode, int $options, ?string &$opened_path): bool
{
$this->ignored = $this->isIgnored();
return $this->__call(__FUNCTION__, func_get_args());
}
| public string|false stream_read ( integer $count ) | ||
| $count | integer | |
public function stream_read(int $count): string|false
{
if (!$this->ignored) {
$this->operations['read'] = [
'path' => $this->decorated->filename ?? '',
'args' => [],
];
}
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean stream_seek ( integer $offset, integer $whence = SEEK_SET ) | ||
| $offset | integer | |
| $whence | integer | |
public function stream_seek(int $offset, int $whence = SEEK_SET): bool
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean stream_set_option ( integer $option, integer $arg1, integer|null $arg2 ) | ||
| $option | integer | |
| $arg1 | integer | |
| $arg2 | integer|null | |
public function stream_set_option(int $option, int $arg1, ?int $arg2): bool
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public array|false stream_stat ( ) |
public function stream_stat(): array|false
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public integer stream_tell ( ) |
public function stream_tell(): int
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean stream_truncate ( integer $new_size ) | ||
| $new_size | integer | |
public function stream_truncate(int $new_size): bool
{
return $this->__call(__FUNCTION__, func_get_args());
}
| public integer stream_write ( string $data ) | ||
| $data | string | |
public function stream_write(string $data): int
{
if (!$this->ignored) {
$this->operations['write'] = [
'path' => $this->decorated->filename ?? '',
'args' => [],
];
}
return $this->__call(__FUNCTION__, func_get_args());
}
| public boolean unlink ( string $path ) | ||
| $path | string | |
public function unlink(string $path): bool
{
if (!$this->isIgnored()) {
$this->operations['unlink'] = [
'path' => $path,
'args' => [],
];
}
return $this->__call(__FUNCTION__, func_get_args());
}
| public static void unregister ( ) |
public static function unregister(): void
{
if (!self::$registered) {
return;
}
@stream_wrapper_restore('file');
self::$registered = false;
}
Signup or Login in order to comment.