PHP Class Dmyers\Storage\Adapter\Base

Datei anzeigen Open project: dmyers/laravel-storage

Protected Properties

Property Type Description
$name

Public Methods

Method Description
copy ( string $path, string $target ) : boolean Copy a file in storage.
delete ( string $path ) : boolean Delete a file from storage.
download ( string $path, string $target ) : boolean Download a file from storage.
exists ( string $path ) : boolean Check if a file exists in storage.
files ( string $path ) : array List all files in storage.
get ( string $path ) : string Get a file's contents from storage.
isDirectory ( string $path ) : boolean Check if a path is a directory in storage.
lastModified ( string $path ) : string Get a file's last modification date from storage.
mime ( string $path ) : string Get a file's mime type from storage.
move ( string $path, string $target ) : boolean Move a file in storage.
put ( string $path, string $contents ) : boolean Put a file into storage.
remoteDownload ( string $url, string $target ) : boolean Download a remote file locally.
remoteUpload ( string $url, string $target ) : boolean Upload a remote file into storage.
render ( string $path ) : Response Render a file from storage to the browser.
size ( string $path ) : string Get a file's size from storage.
type ( string $path ) : string Get a file's type from storage.
upload ( string $path, string $target ) : boolean Upload a file into storage.
url ( string $path ) : string Get the full URL to a file in storage.

Protected Methods

Method Description
config ( $key, $default = null )

Method Details

config() protected method

protected config ( $key, $default = null )

copy() abstract public method

Copy a file in storage.
abstract public copy ( string $path, string $target ) : boolean
$path string The path to the file to copy.
$target string The path to the file to store.
return boolean

delete() abstract public method

Delete a file from storage.
abstract public delete ( string $path ) : boolean
$path string The path to the file to delete.
return boolean

download() abstract public method

Download a file from storage.
abstract public download ( string $path, string $target ) : boolean
$path string The path to the file to download.
$target string The path to the local file to store.
return boolean

exists() abstract public method

Check if a file exists in storage.
abstract public exists ( string $path ) : boolean
$path string The path to the file to check.
return boolean

files() abstract public method

List all files in storage.
abstract public files ( string $path ) : array
$path string The path to list files from.
return array

get() abstract public method

Get a file's contents from storage.
abstract public get ( string $path ) : string
$path string The path to the file to get.
return string

isDirectory() abstract public method

Check if a path is a directory in storage.
abstract public isDirectory ( string $path ) : boolean
$path string The path to check.
return boolean

lastModified() abstract public method

Get a file's last modification date from storage.
abstract public lastModified ( string $path ) : string
$path string The path to the file to get the last modified date.
return string

mime() abstract public method

Get a file's mime type from storage.
abstract public mime ( string $path ) : string
$path string The path to the file to get the mime.
return string

move() abstract public method

Move a file in storage.
abstract public move ( string $path, string $target ) : boolean
$path string The current path to the file to move.
$target string The new path to the file.
return boolean

put() abstract public method

Put a file into storage.
abstract public put ( string $path, string $contents ) : boolean
$path string The path to the file to store.
$contents string The file contents to store.
return boolean

remoteDownload() public method

Download a remote file locally.
public remoteDownload ( string $url, string $target ) : boolean
$url string The url to the remote file to download.
$target string The path to the local file to store.
return boolean

remoteUpload() public method

Upload a remote file into storage.
public remoteUpload ( string $url, string $target ) : boolean
$url string The url to the remote file to upload.
$target string The path to the file to store.
return boolean

render() public method

Render a file from storage to the browser.
public render ( string $path ) : Response
$path string The path to the file to render.
return Response

size() abstract public method

Get a file's size from storage.
abstract public size ( string $path ) : string
$path string The path to the file to get the size.
return string

type() abstract public method

Get a file's type from storage.
abstract public type ( string $path ) : string
$path string The path to the file to get the type.
return string

upload() abstract public method

Upload a file into storage.
abstract public upload ( string $path, string $target ) : boolean
$path string The path to the local file to upload.
$target string The path to the file to store.
return boolean

url() abstract public method

Get the full URL to a file in storage.
abstract public url ( string $path ) : string
$path string The path to the file to get the url.
return string

Property Details

$name protected_oe property

protected $name