PHP Class Gaufrette\Adapter\Sftp

Inheritance: implements Gaufrette\Adapter, implements Gaufrette\Adapter\ChecksumCalculator
Afficher le fichier Open project: knplabs/gaufrette

Protected Properties

Свойство Type Description
$create
$directory
$initialized
$sftp

Méthodes publiques

Méthode Description
__construct ( Ssh\Sftp $sftp, string $directory = null, boolean $create = false )
checksum ( $key )
computeKey ( string $path ) : string Computes the key from the specified path.
delete ( $key )
exists ( $key )
isDirectory ( $key )
keys ( )
mtime ( $key )
read ( $key )
rename ( $sourceKey, $targetKey )
write ( $key, $content )

Méthodes protégées

Méthode Description
computePath ( string $key ) : string Computes the path for the specified key.
createDirectory ( string $directory ) : boolean Creates the specified directory and its parents.
ensureDirectoryExists ( string $directory, boolean $create = false ) Ensures the specified directory exists.
initialize ( ) Performs the adapter's initialization.

Method Details

__construct() public méthode

public __construct ( Ssh\Sftp $sftp, string $directory = null, boolean $create = false )
$sftp Ssh\Sftp An Sftp instance
$directory string The distant directory
$create boolean Whether to create the remote directory if it does not exist

checksum() public méthode

public checksum ( $key )

computeKey() public méthode

Computes the key from the specified path.
public computeKey ( string $path ) : string
$path string
Résultat string

computePath() protected méthode

Computes the path for the specified key.
protected computePath ( string $key ) : string
$key string
Résultat string

createDirectory() protected méthode

Creates the specified directory and its parents.
protected createDirectory ( string $directory ) : boolean
$directory string The directory to create
Résultat boolean TRUE on success, or FALSE on failure

delete() public méthode

public delete ( $key )

ensureDirectoryExists() protected méthode

Ensures the specified directory exists.
protected ensureDirectoryExists ( string $directory, boolean $create = false )
$directory string The directory that we ensure the existence
$create boolean Whether to create it if it does not exist

exists() public méthode

public exists ( $key )

initialize() protected méthode

It will ensure the root directory exists
protected initialize ( )

isDirectory() public méthode

public isDirectory ( $key )

keys() public méthode

public keys ( )

mtime() public méthode

public mtime ( $key )

read() public méthode

public read ( $key )

rename() public méthode

public rename ( $sourceKey, $targetKey )

write() public méthode

public write ( $key, $content )

Property Details

$create protected_oe property

protected $create

$directory protected_oe property

protected $directory

$initialized protected_oe property

protected $initialized

$sftp protected_oe property

protected $sftp