2017-01-19 16:38:03 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Copyright (c) 2016 Robin Appelman <icewind@owncloud.com>
|
|
|
|
* This file is licensed under the Licensed under the MIT license:
|
|
|
|
* http://opensource.org/licenses/MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Icewind\Streams;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A string-like object that maps to an existing stream when opened
|
|
|
|
*/
|
|
|
|
class PathWrapper extends NullWrapper {
|
|
|
|
/**
|
|
|
|
* @param resource $source
|
|
|
|
* @return Path|string
|
|
|
|
*/
|
|
|
|
public static function getPath($source) {
|
2021-03-10 17:31:09 +03:00
|
|
|
return new Path(NullWrapper::class, [
|
|
|
|
NullWrapper::getProtocol() => ['source' => $source]
|
2017-01-19 16:38:03 +03:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|