# includes/filerepo/backend
'FileBackendGroup' => 'includes/filerepo/backend/FileBackendGroup.php',
- 'FileBackendBase' => 'includes/filerepo/backend/FileBackend.php',
'FileBackend' => 'includes/filerepo/backend/FileBackend.php',
+ 'FileBackendStore' => 'includes/filerepo/backend/FileBackend.php',
'FileBackendMultiWrite' => 'includes/filerepo/backend/FileBackendMultiWrite.php',
- 'FileBackendShardListIterator' => 'includes/filerepo/backend/FileBackend.php',
+ 'FileBackendStoreShardListIterator' => 'includes/filerepo/backend/FileBackend.php',
'FSFileBackend' => 'includes/filerepo/backend/FSFileBackend.php',
'FSFileBackendFileList' => 'includes/filerepo/backend/FSFileBackend.php',
'SwiftFileBackend' => 'includes/filerepo/backend/SwiftFileBackend.php',
const OVERWRITE_SAME = 4;
const SKIP_LOCKING = 8;
- /** @var FileBackendBase */
+ /** @var FileBackend */
protected $backend;
/** @var Array Map of zones to config */
protected $zones = array();
// Required settings
$this->name = $info['name'];
- if ( $info['backend'] instanceof FileBackendBase ) {
+ if ( $info['backend'] instanceof FileBackend ) {
$this->backend = $info['backend']; // useful for testing
} else {
$this->backend = FileBackendGroup::singleton()->get( $info['backend'] );
/**
* Get the file backend instance
*
- * @return FileBackendBase
+ * @return FileBackend
*/
public function getBackend() {
return $this->backend;
* @ingroup FileBackend
* @since 1.19
*/
-class FSFileBackend extends FileBackend {
+class FSFileBackend extends FileBackendStore {
protected $basePath; // string; directory holding the container directories
/** @var Array Map of container names to root paths */
protected $containerPaths = array(); // for custom container paths
protected $hadWarningErrors = array();
/**
- * @see FileBackend::__construct()
+ * @see FileBackendStore::__construct()
* Additional $config params include:
* basePath : File system directory that holds containers.
* containerPaths : Map of container names to custom file system directories.
}
/**
- * @see FileBackend::resolveContainerName()
+ * @see FileBackendStore::resolveContainerName()
*/
protected function resolveContainerName( $container ) {
if ( $container !== '.' ) {
}
/**
- * @see FileBackend::resolveContainerPath()
+ * @see FileBackendStore::resolveContainerPath()
*/
protected function resolveContainerPath( $container, $relStoragePath ) {
if ( isset( $this->containerPaths[$container] ) || isset( $this->basePath ) ) {
}
/**
- * @see FileBackend::isPathUsableInternal()
+ * @see FileBackendStore::isPathUsableInternal()
*/
public function isPathUsableInternal( $storagePath ) {
$fsPath = $this->resolveToFSPath( $storagePath );
}
/**
- * @see FileBackend::doStoreInternal()
+ * @see FileBackendStore::doStoreInternal()
*/
protected function doStoreInternal( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doCopyInternal()
+ * @see FileBackendStore::doCopyInternal()
*/
protected function doCopyInternal( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doMoveInternal()
+ * @see FileBackendStore::doMoveInternal()
*/
protected function doMoveInternal( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doDeleteInternal()
+ * @see FileBackendStore::doDeleteInternal()
*/
protected function doDeleteInternal( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doCreateInternal()
+ * @see FileBackendStore::doCreateInternal()
*/
protected function doCreateInternal( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doPrepareInternal()
+ * @see FileBackendStore::doPrepareInternal()
*/
protected function doPrepareInternal( $fullCont, $dirRel, array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doSecureInternal()
+ * @see FileBackendStore::doSecureInternal()
*/
protected function doSecureInternal( $fullCont, $dirRel, array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doCleanInternal()
+ * @see FileBackendStore::doCleanInternal()
*/
protected function doCleanInternal( $fullCont, $dirRel, array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doFileExists()
+ * @see FileBackendStore::doFileExists()
*/
protected function doGetFileStat( array $params ) {
$source = $this->resolveToFSPath( $params['src'] );
}
/**
- * @see FileBackend::doClearCache()
+ * @see FileBackendStore::doClearCache()
*/
protected function doClearCache( array $paths = null ) {
clearstatcache(); // clear the PHP file stat cache
}
/**
- * @see FileBackend::getFileListInternal()
+ * @see FileBackendStore::getFileListInternal()
*/
public function getFileListInternal( $fullCont, $dirRel, array $params ) {
list( $b, $shortCont, $r ) = FileBackend::splitStoragePath( $params['dir'] );
}
/**
- * @see FileBackend::getLocalReference()
+ * @see FileBackendStore::getLocalReference()
*/
public function getLocalReference( array $params ) {
$source = $this->resolveToFSPath( $params['src'] );
}
/**
- * @see FileBackend::getLocalCopy()
+ * @see FileBackendStore::getLocalCopy()
*/
public function getLocalCopy( array $params ) {
$source = $this->resolveToFSPath( $params['src'] );
* @ingroup FileBackend
* @since 1.19
*/
-abstract class FileBackendBase {
+abstract class FileBackend {
protected $name; // string; unique backend name
protected $wikiId; // string; unique wiki name
protected $readOnly; // string; read-only explanation message
}
/**
- * @see FileBackendBase::doOperations()
+ * @see FileBackend::doOperations()
*/
abstract protected function doOperationsInternal( array $ops, array $opts );
* If you are doing a batch of operations that should either
* all succeed or all fail, then use that function instead.
*
- * @see FileBackendBase::doOperations()
+ * @see FileBackend::doOperations()
*
* @param $op Array Operation
* @param $opts Array Operation options
* Performs a single create operation.
* This sets $params['op'] to 'create' and passes it to doOperation().
*
- * @see FileBackendBase::doOperation()
+ * @see FileBackend::doOperation()
*
* @param $params Array Operation parameters
* @param $opts Array Operation options
* Performs a single store operation.
* This sets $params['op'] to 'store' and passes it to doOperation().
*
- * @see FileBackendBase::doOperation()
+ * @see FileBackend::doOperation()
*
* @param $params Array Operation parameters
* @param $opts Array Operation options
* Performs a single copy operation.
* This sets $params['op'] to 'copy' and passes it to doOperation().
*
- * @see FileBackendBase::doOperation()
+ * @see FileBackend::doOperation()
*
* @param $params Array Operation parameters
* @param $opts Array Operation options
* Performs a single move operation.
* This sets $params['op'] to 'move' and passes it to doOperation().
*
- * @see FileBackendBase::doOperation()
+ * @see FileBackend::doOperation()
*
* @param $params Array Operation parameters
* @param $opts Array Operation options
* Performs a single delete operation.
* This sets $params['op'] to 'delete' and passes it to doOperation().
*
- * @see FileBackendBase::doOperation()
+ * @see FileBackend::doOperation()
*
* @param $params Array Operation parameters
* @param $opts Array Operation options
}
/**
- * @see FileBackendBase::prepare()
+ * @see FileBackend::prepare()
*/
abstract protected function doPrepare( array $params );
}
/**
- * @see FileBackendBase::secure()
+ * @see FileBackend::secure()
*/
abstract protected function doSecure( array $params );
}
/**
- * @see FileBackendBase::clean()
+ * @see FileBackend::clean()
*/
abstract protected function doClean( array $params );
* This class defines the methods as abstract that subclasses must implement.
* Outside callers should *not* use functions with "Internal" in the name.
*
- * The FileBackendBase operations are implemented using basic functions
+ * The FileBackend operations are implemented using basic functions
* such as storeInternal(), copyInternal(), deleteInternal() and the like.
* This class is also responsible for path resolution and sanitization.
*
* @ingroup FileBackend
* @since 1.19
*/
-abstract class FileBackend extends FileBackendBase {
+abstract class FileBackendStore extends FileBackend {
/** @var Array Map of paths to small (RAM/disk) cache items */
protected $cache = array(); // (storage path => key => value)
protected $maxCacheSize = 100; // integer; max paths with entries
}
/**
- * @see FileBackend::createInternal()
+ * @see FileBackendStore::createInternal()
*/
abstract protected function doCreateInternal( array $params );
}
/**
- * @see FileBackend::storeInternal()
+ * @see FileBackendStore::storeInternal()
*/
abstract protected function doStoreInternal( array $params );
}
/**
- * @see FileBackend::copyInternal()
+ * @see FileBackendStore::copyInternal()
*/
abstract protected function doCopyInternal( array $params );
}
/**
- * @see FileBackend::deleteInternal()
+ * @see FileBackendStore::deleteInternal()
*/
abstract protected function doDeleteInternal( array $params );
}
/**
- * @see FileBackend::moveInternal()
+ * @see FileBackendStore::moveInternal()
*/
protected function doMoveInternal( array $params ) {
// Copy source to dest
}
/**
- * @see FileBackendBase::concatenate()
+ * @see FileBackend::concatenate()
*/
final public function concatenate( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackend::concatenate()
+ * @see FileBackendStore::concatenate()
*/
protected function doConcatenate( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackendBase::doPrepare()
+ * @see FileBackend::doPrepare()
*/
final protected function doPrepare( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackend::doPrepare()
+ * @see FileBackendStore::doPrepare()
*/
protected function doPrepareInternal( $container, $dir, array $params ) {
return Status::newGood();
}
/**
- * @see FileBackendBase::doSecure()
+ * @see FileBackend::doSecure()
*/
final protected function doSecure( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackend::doSecure()
+ * @see FileBackendStore::doSecure()
*/
protected function doSecureInternal( $container, $dir, array $params ) {
return Status::newGood();
}
/**
- * @see FileBackendBase::doClean()
+ * @see FileBackend::doClean()
*/
final protected function doClean( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackend::doClean()
+ * @see FileBackendStore::doClean()
*/
protected function doCleanInternal( $container, $dir, array $params ) {
return Status::newGood();
}
/**
- * @see FileBackendBase::fileExists()
+ * @see FileBackend::fileExists()
*/
final public function fileExists( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackendBase::getFileTimestamp()
+ * @see FileBackend::getFileTimestamp()
*/
final public function getFileTimestamp( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackendBase::getFileSize()
+ * @see FileBackend::getFileSize()
*/
final public function getFileSize( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackendBase::getFileStat()
+ * @see FileBackend::getFileStat()
*/
final public function getFileStat( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackend::getFileStat()
+ * @see FileBackendStore::getFileStat()
*/
abstract protected function doGetFileStat( array $params );
/**
- * @see FileBackendBase::getFileContents()
+ * @see FileBackend::getFileContents()
*/
public function getFileContents( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackendBase::getFileSha1Base36()
+ * @see FileBackend::getFileSha1Base36()
*/
final public function getFileSha1Base36( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackend::getFileSha1Base36()
+ * @see FileBackendStore::getFileSha1Base36()
*/
protected function doGetFileSha1Base36( array $params ) {
$fsFile = $this->getLocalReference( $params );
}
/**
- * @see FileBackendBase::getFileProps()
+ * @see FileBackend::getFileProps()
*/
final public function getFileProps( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackendBase::getLocalReference()
+ * @see FileBackend::getLocalReference()
*/
public function getLocalReference( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackendBase::streamFile()
+ * @see FileBackend::streamFile()
*/
final public function streamFile( array $params ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackend::streamFile()
+ * @see FileBackendStore::streamFile()
*/
protected function doStreamFile( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackendBase::getFileList()
+ * @see FileBackend::getFileList()
*/
final public function getFileList( array $params ) {
list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] );
wfDebug( __METHOD__ . ": iterating over all container shards.\n" );
// File listing spans multiple containers/shards
list( $b, $shortCont, $r ) = self::splitStoragePath( $params['dir'] );
- return new FileBackendShardListIterator( $this,
+ return new FileBackendStoreShardListIterator( $this,
$fullCont, $dir, $this->getContainerSuffixes( $shortCont ), $params );
}
}
/**
* Do not call this function from places outside FileBackend
*
- * @see FileBackend::getFileList()
+ * @see FileBackendStore::getFileList()
*
* @param $container string Resolved container name
* @param $dir string Resolved path relative to container
}
/**
- * @see FileBackendBase::doOperationsInternal()
+ * @see FileBackend::doOperationsInternal()
*/
protected function doOperationsInternal( array $ops, array $opts ) {
wfProfileIn( __METHOD__ );
}
/**
- * @see FileBackendBase::clearCache()
+ * @see FileBackend::clearCache()
*/
final public function clearCache( array $paths = null ) {
if ( is_array( $paths ) ) {
/**
* Clears any additional stat caches for storage paths
*
- * @see FileBackendBase::clearCache()
+ * @see FileBackend::clearCache()
*
* @param $paths Array Storage paths (optional)
* @return void
* Like resolveStoragePath() except null values are returned if
* the container is sharded and the shard could not be determined.
*
- * @see FileBackend::resolveStoragePath()
+ * @see FileBackendStore::resolveStoragePath()
*
* @param $storagePath string
* @return Array (container, path) or (null, null) if invalid
}
/**
- * FileBackend helper function to handle file listings that span container shards.
- * Do not use this class from places outside of FileBackend.
+ * FileBackendStore helper function to handle file listings that span container shards.
+ * Do not use this class from places outside of FileBackendStore.
*
- * @ingroup FileBackend
+ * @ingroup FileBackendStore
*/
-class FileBackendShardListIterator implements Iterator {
- /* @var FileBackend */
+class FileBackendStoreShardListIterator implements Iterator {
+ /* @var FileBackendStore */
protected $backend;
/* @var Array */
protected $params;
protected $pos = 0; // integer
/**
- * @param $backend FileBackend
+ * @param $backend FileBackendStore
* @param $container string Full storage container name
* @param $dir string Storage directory relative to container
* @param $suffixes Array List of container shard suffixes
* @param $params Array
*/
public function __construct(
- FileBackend $backend, $container, $dir, array $suffixes, array $params
+ FileBackendStore $backend, $container, $dir, array $suffixes, array $params
) {
$this->backend = $backend;
$this->container = $container;
* Get the backend object with a given name
*
* @param $name string
- * @return FileBackendBase
+ * @return FileBackend
* @throws MWException
*/
public function get( $name ) {
* Get an appropriate backend object from a storage path
*
* @param $storagePath string
- * @return FileBackendBase|null Backend or null on failure
+ * @return FileBackend|null Backend or null on failure
*/
public function backendFromPath( $storagePath ) {
list( $backend, $c, $p ) = FileBackend::splitStoragePath( $storagePath );
* @ingroup FileBackend
* @since 1.19
*/
-class FileBackendMultiWrite extends FileBackendBase {
- /** @var Array Prioritized list of FileBackend objects */
+class FileBackendMultiWrite extends FileBackend {
+ /** @var Array Prioritized list of FileBackendStore objects */
protected $backends = array(); // array of (backend index => backends)
- protected $masterIndex = -1; // index of master backend
+ protected $masterIndex = -1; // integer; index of master backend
/**
* Construct a proxy backend that consists of several internal backends.
* Additional $config params include:
* 'backends' : Array of backend config and multi-backend settings.
* Each value is the config used in the constructor of a
- * FileBackend class, but with these additional settings:
+ * FileBackendStore class, but with these additional settings:
* 'class' : The name of the backend class
* 'isMultiMaster' : This must be set for one backend.
* @param $config Array
}
/**
- * @see FileBackendBase::doOperationsInternal()
+ * @see FileBackend::doOperationsInternal()
*/
final protected function doOperationsInternal( array $ops, array $opts ) {
$status = Status::newGood();
* for a set of operations with that of a given internal backend.
*
* @param $ops Array List of file operation arrays
- * @param $backend FileBackend
+ * @param $backend FileBackendStore
* @return Array
*/
- protected function substOpBatchPaths( array $ops, FileBackend $backend ) {
+ protected function substOpBatchPaths( array $ops, FileBackendStore $backend ) {
$newOps = array(); // operations
foreach ( $ops as $op ) {
$newOp = $op; // operation
* Same as substOpBatchPaths() but for a single operation
*
* @param $op File operation array
- * @param $backend FileBackend
+ * @param $backend FileBackendStore
* @return Array
*/
- protected function substOpPaths( array $ops, FileBackend $backend ) {
+ protected function substOpPaths( array $ops, FileBackendStore $backend ) {
$newOps = $this->substOpBatchPaths( array( $ops ), $backend );
return $newOps[0];
}
* Substitute the backend of storage paths with an internal backend's name
*
* @param $paths Array|string List of paths or single string path
- * @param $backend FileBackend
+ * @param $backend FileBackendStore
* @return Array|string
*/
- protected function substPaths( $paths, FileBackend $backend ) {
+ protected function substPaths( $paths, FileBackendStore $backend ) {
return preg_replace(
'!^mwstore://' . preg_quote( $this->name ) . '/!',
'mwstore://' . $backend->getName() . '/',
}
/**
- * @see FileBackendBase::doPrepare()
+ * @see FileBackend::doPrepare()
*/
public function doPrepare( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackendBase::doSecure()
+ * @see FileBackend::doSecure()
*/
public function doSecure( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackendBase::doClean()
+ * @see FileBackend::doClean()
*/
public function doClean( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackendBase::getFileList()
+ * @see FileBackend::getFileList()
*/
public function concatenate( array $params ) {
// We are writing to an FS file, so we don't need to do this per-backend
}
/**
- * @see FileBackendBase::fileExists()
+ * @see FileBackend::fileExists()
*/
public function fileExists( array $params ) {
$realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
}
/**
- * @see FileBackendBase::getFileTimestamp()
+ * @see FileBackend::getFileTimestamp()
*/
public function getFileTimestamp( array $params ) {
$realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
}
/**
- * @see FileBackendBase::getFileSize()
+ * @see FileBackend::getFileSize()
*/
public function getFileSize( array $params ) {
$realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
}
/**
- * @see FileBackendBase::getFileStat()
+ * @see FileBackend::getFileStat()
*/
public function getFileStat( array $params ) {
$realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
}
/**
- * @see FileBackendBase::getFileContents()
+ * @see FileBackend::getFileContents()
*/
public function getFileContents( array $params ) {
$realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
}
/**
- * @see FileBackendBase::getFileSha1Base36()
+ * @see FileBackend::getFileSha1Base36()
*/
public function getFileSha1Base36( array $params ) {
$realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
}
/**
- * @see FileBackendBase::getFileProps()
+ * @see FileBackend::getFileProps()
*/
public function getFileProps( array $params ) {
$realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
}
/**
- * @see FileBackendBase::streamFile()
+ * @see FileBackend::streamFile()
*/
public function streamFile( array $params ) {
$realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
}
/**
- * @see FileBackendBase::getLocalReference()
+ * @see FileBackend::getLocalReference()
*/
public function getLocalReference( array $params ) {
$realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
}
/**
- * @see FileBackendBase::getLocalCopy()
+ * @see FileBackend::getLocalCopy()
*/
public function getLocalCopy( array $params ) {
$realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
}
/**
- * @see FileBackendBase::getFileList()
+ * @see FileBackend::getFileList()
*/
public function getFileList( array $params ) {
$realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] );
}
/**
- * @see FileBackendBase::clearCache()
+ * @see FileBackend::clearCache()
*/
public function clearCache( array $paths = null ) {
foreach ( $this->backends as $backend ) {
abstract class FileOp {
/** @var Array */
protected $params = array();
- /** @var FileBackendBase */
+ /** @var FileBackendStore */
protected $backend;
protected $state = self::STATE_NEW; // integer
/**
* Build a new file operation transaction
*
- * @params $backend FileBackend
+ * @params $backend FileBackendStore
* @params $params Array
* @throws MWException
*/
- final public function __construct( FileBackendBase $backend, array $params ) {
+ final public function __construct( FileBackendStore $backend, array $params ) {
$this->backend = $backend;
list( $required, $optional ) = $this->allowedParams();
foreach ( $required as $name ) {
/**
* Store a file into the backend from a file on the file system.
- * Parameters similar to FileBackend::storeInternal(), which include:
+ * Parameters similar to FileBackendStore::storeInternal(), which include:
* src : source path on file system
* dst : destination storage path
* overwrite : do nothing and pass if an identical file exists at destination
/**
* Create a file in the backend with the given content.
- * Parameters similar to FileBackend::createInternal(), which include:
+ * Parameters similar to FileBackendStore::createInternal(), which include:
* content : the raw file contents
* dst : destination storage path
* overwrite : do nothing and pass if an identical file exists at destination
/**
* Copy a file from one storage path to another in the backend.
- * Parameters similar to FileBackend::copyInternal(), which include:
+ * Parameters similar to FileBackendStore::copyInternal(), which include:
* src : source storage path
* dst : destination storage path
* overwrite : do nothing and pass if an identical file exists at destination
/**
* Move a file from one storage path to another in the backend.
- * Parameters similar to FileBackend::moveInternal(), which include:
+ * Parameters similar to FileBackendStore::moveInternal(), which include:
* src : source storage path
* dst : destination storage path
* overwrite : do nothing and pass if an identical file exists at destination
/**
* Delete a file at the given storage path from the backend.
- * Parameters similar to FileBackend::deleteInternal(), which include:
+ * Parameters similar to FileBackendStore::deleteInternal(), which include:
* src : source storage path
* ignoreMissingSource : don't return an error if the file does not exist
*/
* @ingroup FileBackend
* @since 1.19
*/
-class SwiftFileBackend extends FileBackend {
+class SwiftFileBackend extends FileBackendStore {
/** @var CF_Authentication */
protected $auth; // Swift authentication handler
protected $authTTL; // integer seconds
protected $connContainers = array(); // container object cache
/**
- * @see FileBackend::__construct()
+ * @see FileBackendStore::__construct()
* Additional $config params include:
* swiftAuthUrl : Swift authentication server URL
* swiftUser : Swift user used by MediaWiki (account:username)
}
/**
- * @see FileBackend::resolveContainerPath()
+ * @see FileBackendStore::resolveContainerPath()
*/
protected function resolveContainerPath( $container, $relStoragePath ) {
if ( strlen( urlencode( $relStoragePath ) ) > 1024 ) {
}
/**
- * @see FileBackend::isPathUsableInternal()
+ * @see FileBackendStore::isPathUsableInternal()
*/
public function isPathUsableInternal( $storagePath ) {
list( $container, $rel ) = $this->resolveStoragePathReal( $storagePath );
}
/**
- * @see FileBackend::doCopyInternal()
+ * @see FileBackendStore::doCopyInternal()
*/
protected function doCreateInternal( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doStoreInternal()
+ * @see FileBackendStore::doStoreInternal()
*/
protected function doStoreInternal( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doCopyInternal()
+ * @see FileBackendStore::doCopyInternal()
*/
protected function doCopyInternal( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doDeleteInternal()
+ * @see FileBackendStore::doDeleteInternal()
*/
protected function doDeleteInternal( array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doPrepareInternal()
+ * @see FileBackendStore::doPrepareInternal()
*/
protected function doPrepareInternal( $fullCont, $dir, array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doSecureInternal()
+ * @see FileBackendStore::doSecureInternal()
*/
protected function doSecureInternal( $fullCont, $dir, array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doCleanInternal()
+ * @see FileBackendStore::doCleanInternal()
*/
protected function doCleanInternal( $fullCont, $dir, array $params ) {
$status = Status::newGood();
}
/**
- * @see FileBackend::doFileExists()
+ * @see FileBackendStore::doFileExists()
*/
protected function doGetFileStat( array $params ) {
list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
}
/**
- * @see FileBackendBase::getFileContents()
+ * @see FileBackend::getFileContents()
*/
public function getFileContents( array $params ) {
list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
}
/**
- * @see FileBackend::getFileListInternal()
+ * @see FileBackendStore::getFileListInternal()
*/
public function getFileListInternal( $fullCont, $dir, array $params ) {
return new SwiftFileBackendFileList( $this, $fullCont, $dir );
}
/**
- * @see FileBackend::doGetFileSha1base36()
+ * @see FileBackendStore::doGetFileSha1base36()
*/
public function doGetFileSha1base36( array $params ) {
$stat = $this->getFileStat( $params );
}
/**
- * @see FileBackend::doStreamFile()
+ * @see FileBackendStore::doStreamFile()
*/
protected function doStreamFile( array $params ) {
$status = Status::newGood();
try {
$output = fopen( 'php://output', 'w' );
- // FileBackend::streamFile() already checks existence
$obj = new CF_Object( $cont, $srcRel, false, false ); // skip HEAD request
$obj->stream( $output, $this->headersFromParams( $params ) );
} catch ( InvalidResponseException $e ) { // 404? connection problem?
}
/**
- * @see FileBackend::getLocalCopy()
+ * @see FileBackendStore::getLocalCopy()
*/
public function getLocalCopy( array $params ) {
list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] );
}
/**
- * @see FileBackend::doClearCache()
+ * @see FileBackendStore::doClearCache()
*/
protected function doClearCache( array $paths = null ) {
$this->connContainers = array(); // clear container object cache