PHP Класс Gaufrette\Adapter\Ftp

This adapter is not cached, if you need it to be cached, please see the CachedFtp adapter which is a proxy class implementing a cache layer.
Автор: Antoine Hérault ([email protected])
Наследование: implements Gaufrette\Adapter
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$connection
$create
$directory
$fileData
$host
$mode
$passive
$password
$port
$ssl
$username
$utf8

Открытые методы

Метод Описание
__construct ( string $directory, string $host, array $options = [] )
createFile ( $key, Gaufrette\Filesystem $filesystem )
delete ( $key )
exists ( $key )
isDirectory ( $key )
keys ( )
listDirectory ( string $directory = '' ) : array Lists files from the specified directory. If a pattern is specified, it only returns files matching it.
listKeys ( $prefix = '' )
mtime ( $key )
read ( $key )
rename ( $sourceKey, $targetKey )
write ( $key, $content )

Защищенные методы

Метод Описание
createDirectory ( string $directory ) Creates the specified directory and its parent directories.
ensureDirectoryExists ( string $directory, boolean $create = false ) Ensures the specified directory exists. If it does not, and the create parameter is set to TRUE, it tries to create it.

Приватные методы

Метод Описание
close ( ) Closes the adapter's ftp connection.
computePath ( string $key ) Computes the path for the given key.
connect ( ) Opens the adapter's ftp connection.
fetchKeys ( $directory = '', $onlyKeys = true )
getConnection ( ) : resource Returns an opened ftp connection resource. If the connection is not already opened, it open it before.
isConnected ( ) : boolean Indicates whether the adapter has an open ftp connection.
isDir ( string $directory ) : boolean
isLinuxListing ( $info )
parseRawlist ( array $rawlist ) : array Parses the given raw list.

Описание методов

__construct() публичный Метод

public __construct ( string $directory, string $host, array $options = [] )
$directory string The directory to use in the ftp server
$host string The host of the ftp server
$options array The options like port, username, password, passive, create, mode

createDirectory() защищенный Метод

Creates the specified directory and its parent directories.
protected createDirectory ( string $directory )
$directory string Directory to create

createFile() публичный Метод

public createFile ( $key, Gaufrette\Filesystem $filesystem )
$filesystem Gaufrette\Filesystem

delete() публичный Метод

public delete ( $key )

ensureDirectoryExists() защищенный Метод

Ensures the specified directory exists. If it does not, and the create parameter is set to TRUE, it tries to create it.
protected ensureDirectoryExists ( string $directory, boolean $create = false )
$directory string
$create boolean Whether to create the directory if it does not exist

exists() публичный Метод

public exists ( $key )

isDirectory() публичный Метод

public isDirectory ( $key )

keys() публичный Метод

public keys ( )

listDirectory() публичный Метод

Lists files from the specified directory. If a pattern is specified, it only returns files matching it.
public listDirectory ( string $directory = '' ) : array
$directory string The path of the directory to list from
Результат array An array of keys and dirs

listKeys() публичный Метод

public listKeys ( $prefix = '' )

mtime() публичный Метод

public mtime ( $key )

read() публичный Метод

public read ( $key )

rename() публичный Метод

public rename ( $sourceKey, $targetKey )

write() публичный Метод

public write ( $key, $content )

Описание свойств

$connection защищенное свойство

protected $connection

$create защищенное свойство

protected $create

$directory защищенное свойство

protected $directory

$fileData защищенное свойство

protected $fileData

$host защищенное свойство

protected $host

$mode защищенное свойство

protected $mode

$passive защищенное свойство

protected $passive

$password защищенное свойство

protected $password

$port защищенное свойство

protected $port

$ssl защищенное свойство

protected $ssl

$username защищенное свойство

protected $username

$utf8 защищенное свойство

protected $utf8