VFS
[ class tree: VFS ] [ index: VFS ] [ all elements ]

Class: VFS_Object

Source Location: /VFS-0.0.5/VFS/Object.php

Class Overview


A wrapper for the VFS class to return objects, instead of arrays.


Author(s):

Version:

  • $Revision: 1.13 $

Methods


Inherited Variables

Inherited Methods


Class Details

[line 20]
A wrapper for the VFS class to return objects, instead of arrays.

$Horde: framework/VFS/VFS/Object.php,v 1.13 2005/01/03 13:09:23 jan Exp $

Copyright 2002-2005 Jon Wood <jon@jellybob.co.uk>

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.



[ Top ]


Method Detail

VFS_Object (Constructor)   [line 55]

VFS_Object VFS_Object( object VFS &$vfs)

Constructor.

If you pass in an existing VFS object, it will be used as the VFS object for this object.

  • Access: public

Parameters:

object VFS   &$vfs   —  The VFS object to wrap.

[ Top ]

changePermissions   [line 293]

mixed changePermissions( string $path, string $permission)

Changes permissions for an Item on the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Parameters:

string   $path   —  Holds the path of directory of the Item.
string   $permission   —  TODO

[ Top ]

checkCredentials   [line 128]

mixed checkCredentials( )

Check the credentials that we have to see if there is a valid login.
  • Return: True on success, PEAR_Error describing the problem if the credentials are invalid.
  • Access: public

[ Top ]

createFolder   [line 230]

mixed createFolder( string $path)

Create a folder in the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Parameters:

string   $path   —  The path to the folder.

[ Top ]

deleteFile   [line 201]

mixed deleteFile( string $path, string $name)

Delete a file from the VFS.
  • Return: True on success or a PEAR_Error object on failure.

Parameters:

string   $path   —  The path to store the file in.
string   $name   —  The filename to use.

[ Top ]

deleteFolder   [line 244]

mixed deleteFolder( string $path)

Deletes a folder from the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Parameters:

string   $path   —  The path of the folder to delete.

[ Top ]

factory   [line 82]

object VFS_Object &factory( mixed $driver, [optional $params = array()])

Attempts to return a concrete VFS_Object instance based on $driver.
  • Return: The newly created concrete VFS_Object instance, or false on an error.
  • Access: public

Parameters:

mixed   $driver   —  The type of concrete VFS subclass to return. This is based on the storage driver ($driver). The code is dynamically included. If $driver is an array then we will look in $driver[0]/lib/VFS/ for the subclass implementation named $driver[1].php.
optional   $params   —  array $params A hash containing any additional configuration or connection parameters a subclass might need.

[ Top ]

getModifiablePermissions   [line 318]

array getModifiablePermissions( )

Return the array specificying what permissions are changeable for this implementation.
  • Return: Changeable permisions.
  • Access: public

[ Top ]

getRequiredCredentials   [line 305]

array getRequiredCredentials( )

Return the list of additional credentials required, if any.
  • Return: Credential list.
  • Access: public

[ Top ]

listFolder   [line 262]

mixed listFolder( string $path)

Returns a VFS_ListItem object if the folder can be read, or a PEAR_Error if it can't be. Returns false once the folder has been completely read.
  • Return: File list (array) on success, a PEAR_Error object on failure, or false if the folder is completely read.
  • Access: public

Parameters:

string   $path   —  The path of the diretory.

[ Top ]

read   [line 155]

string read( string $path)

Retrieve a file from the VFS.
  • Return: The file data.
  • Access: public

Parameters:

string   $path   —  The pathname to the file.

[ Top ]

rename   [line 216]

mixed rename( string $oldpath, string $newpath, string $oldname, string $newname)

Rename a file in the VFS.
  • Return: True on success or a PEAR_Error object on failure.

Parameters:

string   $oldpath   —  The old path to the file.
string   $oldname   —  The old filename.
string   $newpath   —  The new path of the file.
string   $newname   —  The new filename.

[ Top ]

setParams   [line 141]

void setParams( [optional $params = array()])

Set configuration parameters.
  • Access: public

Parameters:

optional   $params   —  array $params An associative array: KEY: param name, VAL: param value

[ Top ]

singleton   [line 114]

object VFS_Object &singleton( mixed $driver, [optional $params = array()])

Attempts to return a reference to a concrete VFS instance based on $driver. It will only create a new instance if no VFS instance with the same parameters currently exists.

This should be used if multiple types of file backends (and, thus, multiple VFS instances) are required.

This method must be invoked as: $var = &VFS::singleton()

  • Return: The concrete VFS_Object reference, or false on error.
  • Access: public

Parameters:

mixed   $driver   —  The type of concrete VFS subclass to return. This is based on the storage driver ($driver). The code is dynamically included. If $driver is an array then we will look in $driver[0]/lib/VFS/ for the subclass implementation named $driver[1].php.
optional   $params   —  array $params A hash containing any additional configuration or connection parameters a subclass might need.

[ Top ]

write   [line 172]

mixed write( string $path, string $tmpFile, [optional $autocreate = false])

Store a file in the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Parameters:

string   $path   —  The path to store the file in.
string   $tmpFile   —  The temporary file containing the data to be stored.
optional   $autocreate   —  boolean $autocreate Automatically create directories?

[ Top ]

writeData   [line 188]

mixed writeData( string $path, string $data, [optional $autocreate = false])

Store a file in the VFS from raw data.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Parameters:

string   $path   —  The path to store the file in.
string   $data   —  The file data.
optional   $autocreate   —  boolean $autocreate Automatically create directories?

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:31:25 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.