PHP 클래스 S3Browser, s3browser

파일 보기 프로젝트 열기: powdahound/s3browser 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $bucketName, $accessKey, $secretKey, $useSSL = true, $endPoint = 's3.amazonaws.com' )
enableCaching ( string $dir, string $duration ) : void Enable caching of files list so S3 doesn't have to be queried on every request
getBreadcrumb ( string $path = '/' ) : array Returns directory data for all levels of the given path to be used when displaying a breadcrumb.
getFiles ( string $path = '/' ) : array Returns list of file objects in the given path
getParent ( string $path = '/' ) : array Returns parent directory
getTree ( ) : array Build a tree representing the directory structure of the bucket's contents.

비공개 메소드들

메소드 설명
formatSize ( string $bytes ) : string Takes a size in bytes and converts it to a more human-readable format
getBucketContents ( ) : array Get S3 bucket contents (from cache if possible)
sort ( $a, $b ) Sort with dirs first, then alphabetical ascending

메소드 상세

__construct() 공개 메소드

public __construct ( $bucketName, $accessKey, $secretKey, $useSSL = true, $endPoint = 's3.amazonaws.com' )

enableCaching() 공개 메소드

Enable caching of files list so S3 doesn't have to be queried on every request
public enableCaching ( string $dir, string $duration ) : void
$dir string Location to cache listing
$duration string Time in seconds before expiring cache
리턴 void

getBreadcrumb() 공개 정적인 메소드

Returns directory data for all levels of the given path to be used when displaying a breadcrumb.
public static getBreadcrumb ( string $path = '/' ) : array
$path string
리턴 array

getFiles() 공개 메소드

Returns list of file objects in the given path
public getFiles ( string $path = '/' ) : array
$path string Directory path
리턴 array Directory contents

getParent() 공개 정적인 메소드

Returns parent directory
public static getParent ( string $path = '/' ) : array
$path string
리턴 array

getTree() 공개 메소드

Build a tree representing the directory structure of the bucket's contents.
public getTree ( ) : array
리턴 array