Properties

$uri

$uri : 

Type

$mnt

$mnt : 

Type

$path

$path : 

Type

$command

$command : 

Type

$params

$params : 

Type

$data

$data : 

Type

$size

$size : 

Type

$position

$position : 

Type

$raiseErrors

$raiseErrors : 

Type

Methods

getFile()

getFile(  $dir,   $uri,   $mnt,   $command,   $params,   $path,   $cache = null) 

Parameters

$dir
$uri
$mnt
$command
$params
$path
$cache

stream_open()

stream_open(  $uri,   $mode,   $options,   $opened_path) 

Parameters

$uri
$mode
$options
$opened_path

stream_read()

stream_read(  $nb) 

Parameters

$nb

stream_eof()

stream_eof() 

stream_tell()

stream_tell() 

stream_seek()

stream_seek(  $offset,   $whence) 

Parameters

$offset
$whence

dir_opendir()

dir_opendir(  $uri,   $options) 

Parameters

$uri
$options

dir_readdir()

dir_readdir() 

dir_rewinddir()

dir_rewinddir() 

stream_stat()

stream_stat() 

url_stat()

url_stat(  $uri,   $flags,   $fstat = false) 

Parameters

$uri
$flags
$fstat

parseURI()

parseURI(string  $uri, string|null  $command, array|null  $params, string|null  $mnt, string|null  $path) : void

Parses an URI and splits it into four sub-parts : mount point, command name, command parameters, and path. Each of these components is optional.

URI syntax: phk://[[/path]][?command[&par=val&...]]

On return, if no command: command=params=null Global command: phk://?command[&par=val&...] => path=mnt=null mnt=null => global command

Test cases : phk:// Error phk://mnt1 mnt=mnt1, path='', command=params=null phk://mnt1/p1/p2 mnt=mnt1, path=p1/p2, command=params=null phk://mnt1/p1/p2?cmd&par1=2&par2=3 mnt=mnt1, path=p1/p2, command=cmd, params=array(par1 => 2, par2 => 3) phk://?gcmd mnt=path=null, command=gcmd, params=null

Parameters

string $uri
string|null $command

Return value

array|null $params

Return value

string|null $mnt

Return value - Null only if global command

string|null $path

Return value - Null only if global command

Throws

\Exception

on invalid syntax

raiseWarning()

raiseWarning(  $msg) 

Parameters

$msg

statArray()

statArray(  $mode,   $size,   $mtime) 

Parameters

$mode
$size
$mtime