ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
League\Flysystem\Adapter\NullAdapter Class Reference
+ Inheritance diagram for League\Flysystem\Adapter\NullAdapter:
+ Collaboration diagram for League\Flysystem\Adapter\NullAdapter:

Public Member Functions

 has ($path)
 Check whether a file is present. More...
 
 write ($path, $contents, Config $config)
 Write a new file.
Parameters
string$path
string$contents
Config$configConfig object
Returns
array|false false on failure file meta data on success
More...
 
 update ($path, $contents, Config $config)
 Update a file.
Parameters
string$path
string$contents
Config$configConfig object
Returns
array|false false on failure file meta data on success
More...
 
 read ($path)
 Read a file.
Parameters
string$path
Returns
array|false
More...
 
 rename ($path, $newpath)
 Rename a file.
Parameters
string$path
string$newpath
Returns
bool
More...
 
 delete ($path)
 Delete a file.
Parameters
string$path
Returns
bool
More...
 
 listContents ($directory='', $recursive=false)
 List contents of a directory.
Parameters
string$directory
bool$recursive
Returns
array
More...
 
 getMetadata ($path)
 Get all the meta data of a file or directory.
Parameters
string$path
Returns
array|false
More...
 
 getSize ($path)
 Get the size of a file.
Parameters
string$path
Returns
array|false
More...
 
 getMimetype ($path)
 Get the mimetype of a file.
Parameters
string$path
Returns
array|false
More...
 
 getTimestamp ($path)
 Get the timestamp of a file.
Parameters
string$path
Returns
array|false
More...
 
 getVisibility ($path)
 Get the visibility of a file.
Parameters
string$path
Returns
array|false
More...
 
 setVisibility ($path, $visibility)
 Set the visibility for a file.
Parameters
string$path
string$visibility
Returns
array|false file meta data
More...
 
 createDir ($dirname, Config $config)
 Create a directory.
Parameters
string$dirnamedirectory name
Config$config
Returns
array|false
More...
 
 deleteDir ($dirname)
 Delete a directory.
Parameters
string$dirname
Returns
bool
More...
 
- Public Member Functions inherited from League\Flysystem\Adapter\AbstractAdapter
 setPathPrefix ($prefix)
 Set the path prefix. More...
 
 getPathPrefix ()
 Get the path prefix. More...
 
 applyPathPrefix ($path)
 Prefix a path. More...
 
 removePathPrefix ($path)
 Remove a path prefix. More...
 
- Public Member Functions inherited from League\Flysystem\AdapterInterface
 writeStream ($path, $resource, Config $config)
 Write a new file using a stream. More...
 
 updateStream ($path, $resource, Config $config)
 Update a file using a stream. More...
 
 copy ($path, $newpath)
 Copy a file. More...
 
- Public Member Functions inherited from League\Flysystem\ReadInterface
 readStream ($path)
 Read a file as a stream. More...
 

Additional Inherited Members

- Data Fields inherited from League\Flysystem\AdapterInterface
const VISIBILITY_PUBLIC = 'public'
 VISIBILITY_PUBLIC public visibility More...
 
const VISIBILITY_PRIVATE = 'private'
 VISIBILITY_PRIVATE private visibility More...
 
- Protected Attributes inherited from League\Flysystem\Adapter\AbstractAdapter
 $pathPrefix
 
 $pathSeparator = '/'
 

Detailed Description

Definition at line 9 of file NullAdapter.php.

Member Function Documentation

◆ createDir()

League\Flysystem\Adapter\NullAdapter::createDir (   $dirname,
Config  $config 
)

Create a directory.

Parameters
string$dirnamedirectory name
Config$config
Returns
array|false

Implements League\Flysystem\AdapterInterface.

Definition at line 132 of file NullAdapter.php.

133  {
134  return ['path' => $dirname, 'type' => 'dir'];
135  }

◆ delete()

League\Flysystem\Adapter\NullAdapter::delete (   $path)

Delete a file.

Parameters
string$path
Returns
bool

Implements League\Flysystem\AdapterInterface.

Definition at line 68 of file NullAdapter.php.

69  {
70  return false;
71  }

◆ deleteDir()

League\Flysystem\Adapter\NullAdapter::deleteDir (   $dirname)

Delete a directory.

Parameters
string$dirname
Returns
bool

Implements League\Flysystem\AdapterInterface.

Definition at line 140 of file NullAdapter.php.

141  {
142  return false;
143  }

◆ getMetadata()

League\Flysystem\Adapter\NullAdapter::getMetadata (   $path)

Get all the meta data of a file or directory.

Parameters
string$path
Returns
array|false

Implements League\Flysystem\ReadInterface.

Definition at line 84 of file NullAdapter.php.

85  {
86  return false;
87  }

◆ getMimetype()

League\Flysystem\Adapter\NullAdapter::getMimetype (   $path)

Get the mimetype of a file.

Parameters
string$path
Returns
array|false

Implements League\Flysystem\ReadInterface.

Definition at line 100 of file NullAdapter.php.

101  {
102  return false;
103  }

◆ getSize()

League\Flysystem\Adapter\NullAdapter::getSize (   $path)

Get the size of a file.

Parameters
string$path
Returns
array|false

Implements League\Flysystem\ReadInterface.

Definition at line 92 of file NullAdapter.php.

93  {
94  return false;
95  }

◆ getTimestamp()

League\Flysystem\Adapter\NullAdapter::getTimestamp (   $path)

Get the timestamp of a file.

Parameters
string$path
Returns
array|false

Implements League\Flysystem\ReadInterface.

Definition at line 108 of file NullAdapter.php.

109  {
110  return false;
111  }

◆ getVisibility()

League\Flysystem\Adapter\NullAdapter::getVisibility (   $path)

Get the visibility of a file.

Parameters
string$path
Returns
array|false

Implements League\Flysystem\ReadInterface.

Definition at line 116 of file NullAdapter.php.

117  {
118  return false;
119  }

◆ has()

League\Flysystem\Adapter\NullAdapter::has (   $path)

Check whether a file is present.

Parameters
string$path
Returns
bool

Implements League\Flysystem\ReadInterface.

Definition at line 21 of file NullAdapter.php.

22  {
23  return false;
24  }

◆ listContents()

League\Flysystem\Adapter\NullAdapter::listContents (   $directory = '',
  $recursive = false 
)

List contents of a directory.

Parameters
string$directory
bool$recursive
Returns
array

Implements League\Flysystem\ReadInterface.

Definition at line 76 of file NullAdapter.php.

77  {
78  return [];
79  }

◆ read()

League\Flysystem\Adapter\NullAdapter::read (   $path)

Read a file.

Parameters
string$path
Returns
array|false

Implements League\Flysystem\ReadInterface.

Definition at line 52 of file NullAdapter.php.

53  {
54  return false;
55  }

◆ rename()

League\Flysystem\Adapter\NullAdapter::rename (   $path,
  $newpath 
)

Rename a file.

Parameters
string$path
string$newpath
Returns
bool

Implements League\Flysystem\AdapterInterface.

Definition at line 60 of file NullAdapter.php.

61  {
62  return false;
63  }

◆ setVisibility()

League\Flysystem\Adapter\NullAdapter::setVisibility (   $path,
  $visibility 
)

Set the visibility for a file.

Parameters
string$path
string$visibility
Returns
array|false file meta data

Implements League\Flysystem\AdapterInterface.

Definition at line 124 of file NullAdapter.php.

125  {
126  return compact('visibility');
127  }

◆ update()

League\Flysystem\Adapter\NullAdapter::update (   $path,
  $contents,
Config  $config 
)

Update a file.

Parameters
string$path
string$contents
Config$configConfig object
Returns
array|false false on failure file meta data on success

Implements League\Flysystem\AdapterInterface.

Definition at line 44 of file NullAdapter.php.

45  {
46  return false;
47  }

◆ write()

League\Flysystem\Adapter\NullAdapter::write (   $path,
  $contents,
Config  $config 
)

Write a new file.

Parameters
string$path
string$contents
Config$configConfig object
Returns
array|false false on failure file meta data on success

Implements League\Flysystem\AdapterInterface.

Definition at line 29 of file NullAdapter.php.

References $result, $type, and League\Flysystem\Config\get().

30  {
31  $type = 'file';
32  $result = compact('contents', 'type', 'path');
33 
34  if ($visibility = $config->get('visibility')) {
35  $result['visibility'] = $visibility;
36  }
37 
38  return $result;
39  }
$result
$type
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: