[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
OpenStack Swift based file backend. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Author: | Russ Nelson |
Author: | Aaron Schulz |
File Size: | 1841 lines (59 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
SwiftFileBackend:: (46 methods):
__construct()
getFeatures()
resolveContainerPath()
isPathUsableInternal()
sanitizeHdrs()
doCreateInternal()
doStoreInternal()
doCopyInternal()
doMoveInternal()
doDeleteInternal()
doDescribeInternal()
doPrepareInternal()
doSecureInternal()
doPublishInternal()
doCleanInternal()
doGetFileStat()
convertSwiftDate()
addMissingMetadata()
doGetFileContentsMulti()
doDirectoryExists()
getDirectoryListInternal()
getFileListInternal()
getDirListPageInternal()
getFileListPageInternal()
buildFileObjectListing()
loadListingStatInternal()
doGetFileXAttributes()
doGetFileSha1base36()
doStreamFile()
doGetLocalCopyMulti()
getFileHttpUrl()
directoriesAreVirtual()
headersFromParams()
doExecuteOpHandlesInternal()
setContainerAccess()
getContainerStat()
createContainer()
deleteContainer()
objectListing()
doPrimeContainerCache()
doGetFileStatMulti()
getAuthentication()
storageUrl()
authTokenHeaders()
getCredsCacheKey()
onError()
SwiftFileOpHandle:: (6 methods):
__construct()
__construct()
key()
next()
rewind()
valid()
SwiftFileBackendDirList:: (2 methods):
current()
pageFromList()
SwiftFileBackendFileList:: (2 methods):
current()
pageFromList()
Class: SwiftFileBackend - X-Ref
__construct( array $config ) X-Ref |
getFeatures() X-Ref |
No description |
resolveContainerPath( $container, $relStoragePath ) X-Ref |
No description |
isPathUsableInternal( $storagePath ) X-Ref |
No description |
sanitizeHdrs( array $params ) X-Ref |
Sanitize and filter the custom headers from a $params array. We only allow certain Content- and X-Content- headers. param: array $params return: array Sanitized value of 'headers' field in $params |
doCreateInternal( array $params ) X-Ref |
No description |
doStoreInternal( array $params ) X-Ref |
No description |
doCopyInternal( array $params ) X-Ref |
No description |
doMoveInternal( array $params ) X-Ref |
No description |
doDeleteInternal( array $params ) X-Ref |
No description |
doDescribeInternal( array $params ) X-Ref |
No description |
doPrepareInternal( $fullCont, $dir, array $params ) X-Ref |
No description |
doSecureInternal( $fullCont, $dir, array $params ) X-Ref |
No description |
doPublishInternal( $fullCont, $dir, array $params ) X-Ref |
No description |
doCleanInternal( $fullCont, $dir, array $params ) X-Ref |
No description |
doGetFileStat( array $params ) X-Ref |
No description |
convertSwiftDate( $ts, $format = TS_MW ) X-Ref |
Convert dates like "Tue, 03 Jan 2012 22:01:04 GMT"/"2013-05-11T07:37:27.678360Z". Dates might also come in like "2013-05-11T07:37:27.678360" from Swift listings, missing the timezone suffix (though Ceph RGW does not appear to have this bug). param: string $ts param: int $format Output format (TS_* constant) return: string |
addMissingMetadata( array $objHdrs, $path ) X-Ref |
Fill in any missing object metadata and save it to Swift param: array $objHdrs Object response headers param: string $path Storage path to object return: array New headers |
doGetFileContentsMulti( array $params ) X-Ref |
No description |
doDirectoryExists( $fullCont, $dir, array $params ) X-Ref |
No description |
getDirectoryListInternal( $fullCont, $dir, array $params ) X-Ref |
param: string $fullCont param: string $dir param: array $params return: SwiftFileBackendDirList |
getFileListInternal( $fullCont, $dir, array $params ) X-Ref |
param: string $fullCont param: string $dir param: array $params return: SwiftFileBackendFileList |
getDirListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) X-Ref |
Do not call this function outside of SwiftFileBackendFileList param: string $fullCont Resolved container name param: string $dir Resolved storage directory with no trailing slash param: string|null $after Resolved container relative path to list items after param: int $limit Max number of items to list param: array $params Parameters for getDirectoryList() return: array List of container relative resolved paths of directories directly under $dir |
getFileListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) X-Ref |
Do not call this function outside of SwiftFileBackendFileList param: string $fullCont Resolved container name param: string $dir Resolved storage directory with no trailing slash param: string|null $after Resolved container relative path of file to list items after param: int $limit Max number of items to list param: array $params Parameters for getDirectoryList() return: array List of resolved container relative paths of files under $dir |
buildFileObjectListing( array $params, $dir, array $objects ) X-Ref |
Build a list of file objects, filtering out any directories and extracting any stat info if provided in $objects (for CF_Objects) param: array $params Parameters for getDirectoryList() param: string $dir Resolved container directory path param: array $objects List of CF_Object items or object names return: array List of (names,stat array or null) entries |
loadListingStatInternal( $path, array $val ) X-Ref |
Do not call this function outside of SwiftFileBackendFileList param: string $path Storage path param: array $val Stat value |
doGetFileXAttributes( array $params ) X-Ref |
No description |
doGetFileSha1base36( array $params ) X-Ref |
No description |
doStreamFile( array $params ) X-Ref |
No description |
doGetLocalCopyMulti( array $params ) X-Ref |
No description |
getFileHttpUrl( array $params ) X-Ref |
No description |
directoriesAreVirtual() X-Ref |
No description |
headersFromParams( array $params ) X-Ref |
Get headers to send to Swift when reading a file based on a FileBackend params array, e.g. that of getLocalCopy(). $params is currently only checked for a 'latest' flag. param: array $params return: array |
doExecuteOpHandlesInternal( array $fileOpHandles ) X-Ref |
No description |
setContainerAccess( $container, array $readGrps, array $writeGrps ) X-Ref |
Set read/write permissions for a Swift container. param: string $container Resolved Swift container param: array $readGrps List of the possible criteria for a request to have param: array $writeGrps A list of the possible criteria for a request to have return: Status |
getContainerStat( $container, $bypassCache = false ) X-Ref |
Get a Swift container stat array, possibly from process cache. Use $reCache if the file count or byte count is needed. param: string $container Container name param: bool $bypassCache Bypass all caches and load from Swift return: array|bool|null False on 404, null on failure |
createContainer( $container, array $params ) X-Ref |
Create a Swift container param: string $container Container name param: array $params return: Status |
deleteContainer( $container, array $params ) X-Ref |
Delete a Swift container param: string $container Container name param: array $params return: Status |
objectListing($fullCont, $type, $limit, $after = null, $prefix = null, $delim = null) X-Ref |
Get a list of objects under a container. Either just the names or a list of stdClass objects with details can be returned. param: string $fullCont param: string $type ('info' for a list of object detail maps, 'names' for names only) param: int $limit param: string|null $after param: string|null $prefix param: string|null $delim return: Status With the list as value |
doPrimeContainerCache( array $containerInfo ) X-Ref |
No description |
doGetFileStatMulti( array $params ) X-Ref |
No description |
getAuthentication() X-Ref |
return: array|null Credential map |
storageUrl( array $creds, $container = null, $object = null ) X-Ref |
param: array $creds From getAuthentication() param: string $container param: string $object return: array |
authTokenHeaders( array $creds ) X-Ref |
param: array $creds From getAuthentication() return: array |
getCredsCacheKey( $username ) X-Ref |
Get the cache key for a container param: string $username return: string |
onError( $status, $func, array $params, $err = '', $code = 0, $desc = '' ) X-Ref |
Log an unexpected exception for this backend. This also sets the Status object to have a fatal error. param: Status|null $status param: string $func param: array $params param: string $err Error string param: int $code HTTP status param: string $desc HTTP status description |
Class: SwiftFileOpHandle - X-Ref
__construct( SwiftFileBackend $backend, Closure $callback, array $httpOp ) X-Ref |
param: SwiftFileBackend $backend param: Closure $callback Function that takes (HTTP request array, status) param: array $httpOp MultiHttpClient op |
__construct( SwiftFileBackend $backend, $fullCont, $dir, array $params ) X-Ref |
param: SwiftFileBackend $backend param: string $fullCont Resolved container name param: string $dir Resolved directory relative to container param: array $params |
key() X-Ref |
return: int |
next() X-Ref |
rewind() X-Ref |
valid() X-Ref |
return: bool |
Class: SwiftFileBackendDirList - X-Ref
Iterator for listing directoriescurrent() X-Ref |
return: string|bool String (relative path) or false |
pageFromList( $container, $dir, &$after, $limit, array $params ) X-Ref |
No description |
Class: SwiftFileBackendFileList - X-Ref
Iterator for listing regular filescurrent() X-Ref |
return: string|bool String (relative path) or false |
pageFromList( $container, $dir, &$after, $limit, array $params ) X-Ref |
No description |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |