org\bovigo\vfs\vfsStream::url PHP Метод

url() публичный статический Метод

prepends the scheme to the given URL
public static url ( string $path ) : string
$path string path to translate to vfsStream url
Результат string
    public static function url($path)
    {
        return self::SCHEME . '://' . join('/', array_map('rawurlencode', explode('/', str_replace('\\', '/', $path))));
    }

Usage Example

Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function _setUpFiles($structure = NULL)
 {
     $structure = $structure ?: ['tmp' => []];
     $this->root = vfsStream::setup('root', 0777, $structure);
     $this->adapter = new TempFileAdapter($this->root->url() . '/tmp/', 'bmtest_');
     $this->manager = new TempFileManager($this->adapter);
 }
All Usage Examples Of org\bovigo\vfs\vfsStream::url