Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



third_party/vfsstream/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php

Table of Contents
This file is part of vfsStream.

For the full copyright and license information, please view the LICENSE file that was distributed with this source code.

Package
org\bovigo\vfs

\org\bovigo\vfs\TestvfsStreamWrapper

Package: Default
Helper class for the test.
Parent(s)
\org\bovigo\vfs\vfsStreamWrapper

Constants

> V Constant READ = 'r'
inherited
open file for reading
Inherited from: \org\bovigo\vfs\vfsStreamWrapper::READ
> V Constant TRUNCATE = 'w'
inherited
truncate file
Inherited from: \org\bovigo\vfs\vfsStreamWrapper::TRUNCATE
> V Constant APPEND = 'a'
inherited
set file pointer to end, append new data
Inherited from: \org\bovigo\vfs\vfsStreamWrapper::APPEND
> V Constant WRITE = 'x'
inherited
set file pointer to start, overwrite existing data
Inherited from: \org\bovigo\vfs\vfsStreamWrapper::WRITE
> V Constant WRITE_NEW = 'c'
inherited
set file pointer to start, overwrite existing data; or create file if does not exist
Inherited from: \org\bovigo\vfs\vfsStreamWrapper::WRITE_NEW
> V Constant READONLY = 0
inherited
file mode: read only
Inherited from: \org\bovigo\vfs\vfsStreamWrapper::READONLY
> V Constant WRITEONLY = 1
inherited
file mode: write only
Inherited from: \org\bovigo\vfs\vfsStreamWrapper::WRITEONLY
> V Constant ALL = 2
inherited
file mode: read and write
Inherited from: \org\bovigo\vfs\vfsStreamWrapper::ALL

Methods

method public dir_closedir () : bool
inherited

closes directory

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::dir_closedir()
Returns
Type Description
bool
method public dir_opendir (string $path, int $options) : bool
inherited

opens a directory

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::dir_opendir()
Parameters
Name Type Description
$path string
$options int
Returns
Type Description
bool
method public dir_readdir () : string
inherited

reads directory contents

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::dir_readdir()
Returns
Type Description
string
method public dir_rewinddir () : bool
inherited

reset directory iteration

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::dir_rewinddir()
Returns
Type Description
bool
method public getRoot () : \org\bovigo\vfs\vfsStreamContainer
static inherited

returns the root content

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::getRoot()
Returns
Type Description
\org\bovigo\vfs\vfsStreamContainer
method public mkdir (string $path, int $mode, int $options) : bool
inherited

creates a new directory

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::mkdir()
Parameters
Name Type Description
$path string
$mode int
$options int
Returns
Type Description
bool
method public register () : void
static inherited

method to register the stream wrapper

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::register()

Please be aware that a call to this method will reset the root element to null. If the stream is already registered the method returns silently. If there is already another stream wrapper registered for the scheme used by vfsStream a vfsStreamException will be thrown.

Throws
Exception Description
\org\bovigo\vfs\vfsStreamException
method public rename (string $path_from, string $path_to) : bool
inherited

rename from one path to another

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::rename()
Parameters
Name Type Description
$path_from string
$path_to string
Returns
Type Description
bool
Details
Author
Benoit Aubuchon
method public rmdir (string $path, int $options) : bool
inherited

removes a directory

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::rmdir()
Parameters
Name Type Description
$path string
$options int
Returns
Type Description
bool
method public setQuota (\org\bovigo\vfs\Quota $quota) : void
static inherited

sets quota for disk space

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::setQuota()
Parameters
Name Type Description
$quota \org\bovigo\vfs\Quota
Details
Since
1.1.0
method public setRoot ( \org\bovigo\vfs\vfsStreamContainer $root) : \org\bovigo\vfs\vfsStreamContainer
static inherited

sets the root content

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::setRoot()
Parameters
Name Type Description
$root \org\bovigo\vfs\vfsStreamContainer
Returns
Type Description
\org\bovigo\vfs\vfsStreamContainer
method public stream_cast (int $cast_as) : bool
inherited

retrieve the underlaying resource

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_cast()

Please note that this method always returns false as there is no underlaying resource to return.

Parameters
Name Type Description
$cast_as int
Returns
Type Description
bool
Details
See
\org\bovigo\vfs\https://github.com/mikey179/vfsStream/issues/3
Since
0.9.0
method public stream_close () : void
inherited

closes the stream

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_close()
Details
See
\org\bovigo\vfs\https://github.com/mikey179/vfsStream/issues/40
method public stream_eof () : bool
inherited

checks whether stream is at end of file

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_eof()
Returns
Type Description
bool
method public stream_flush () : bool
inherited

flushes unstored data into storage

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_flush()
Returns
Type Description
bool
method public stream_lock (int $operation) : bool
inherited

set lock status for stream

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_lock()
Parameters
Name Type Description
$operation int
Returns
Type Description
bool
Details
See
\org\bovigo\vfs\https://github.com/mikey179/vfsStream/issues/6
See
\org\bovigo\vfs\https://github.com/mikey179/vfsStream/issues/31
See
\org\bovigo\vfs\https://github.com/mikey179/vfsStream/issues/40
Since
0.10.0
method public stream_metadata (string $path, int $option, mixed $var) : bool
inherited

sets metadata like owner, user or permissions

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_metadata()
Parameters
Name Type Description
$path string
$option int
$var mixed
Returns
Type Description
bool
Details
Since
1.1.0
method public stream_open (string $path, string $mode, string $options, string $opened_path) : bool
inherited

open the stream

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_open()
Parameters
Name Type Description
$path string

the path to open

$mode string

mode for opening

$options string

options for opening

$opened_path string

full path that was actually opened

Returns
Type Description
bool
method public stream_read (int $count) : string
inherited

read the stream up to $count bytes

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_read()
Parameters
Name Type Description
$count int

amount of bytes to read

Returns
Type Description
string
method public stream_seek (int $offset, int $whence) : bool
inherited

seeks to the given offset

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_seek()
Parameters
Name Type Description
$offset int
$whence int
Returns
Type Description
bool
method public stream_set_option (int $option, int $arg1, int $arg2) : bool
inherited

sets options on the stream

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_set_option()
Parameters
Name Type Description
$option int

key of option to set

$arg1 int
$arg2 int
Returns
Type Description
bool
Details
See
\org\bovigo\vfs\https://github.com/mikey179/vfsStream/issues/15
See
\org\bovigo\vfs\http://www.php.net/manual/streamwrapper.stream-set-option.php
Since
0.10.0
method public stream_stat () : array
inherited

returns status of stream

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_stat()
Returns
Type Description
array
method public stream_tell () : int
inherited

returns the current position of the stream

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_tell()
Returns
Type Description
int
method public stream_truncate (int $size) : bool
inherited

truncates a file to a given length

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_truncate()
Parameters
Name Type Description
$size int

length to truncate file to

Returns
Type Description
bool
Details
Since
1.1.0
method public stream_write (string $data) : int
inherited

writes data into the stream

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::stream_write()
Parameters
Name Type Description
$data string
Returns
Type Description
int amount of bytes written
method public unlink (string $path) : bool
inherited

remove the data under the given path

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::unlink()
Parameters
Name Type Description
$path string
Returns
Type Description
bool
method public unregister () : void
static

unregisters vfsStreamWrapper

method public url_stat (string $path, int $flags) : array
inherited

returns status of url

Inherited from: \org\bovigo\vfs\vfsStreamWrapper::url_stat()
Parameters
Name Type Description
$path string

path of url to return status for

$flags int

flags set by the stream API

Returns
Type Description
array

\org\bovigo\vfs\vfsStreamWrapperAlreadyRegisteredTestCase

Package: Default
Test for org\bovigo\vfs\vfsStreamWrapper.
Parent(s)
\PHPUnit_Framework_TestCase

Methods

method public registerOverAnotherStreamWrapper () : void

registering the stream wrapper when another stream wrapper is already registered for the vfs scheme should throw an exception

Details
ExpectedException
org\bovigo\vfs\vfsStreamException
Test
method public setUp () : void

set up test environment

method public tearDown () : void

clean up test environment

Documentation was generated by phpDocumentor 2.0.0a12 .