PHP Class FtpSource, cakephp-ftp

Inheritance: extends DataSource
Afficher le fichier Open project: fotografde/cakephp-ftp

Méthodes publiques

Свойство Type Description
$config array config
$description string description

Protected Properties

Свойство Type Description
$_schema array _schema Default schema

Méthodes publiques

Méthode Description
__construct ( array $config ) __construct
__destruct ( ) __destruct Quits
calculate ( Object $model, mixed $func, array $params = [] ) : array calculate
connect ( array $config = [] ) : boolean connect
console ( string $cmd = null ) : string console
create ( Model $model, array $fields = null, array $values = null ) : boolean create Upload/Download
delete ( Model $model, str $file = null ) : boolean delete Deletes a remote file
describe ( obj $model ) describe Dynamically describes _schema
init ( array $config = [] ) : boolean init Merges config
listSources ( $data = null ) listSources
query ( string $query = null, array $data = null ) : mixed query Provides an interface to datasource methods.
quit ( ) : boolean quit Closes and cleans up
read ( Model $model, array $queryData = [], $recursive = null ) : array read Find files on remote server
update ( Model $model, array $fields = null, array $values = null, array $conditions = null ) : boolean update Upload/Download after find

Méthodes protégées

Méthode Description
_chmodnum ( string $chmod ) : string _chmodnum
_ftp ( string $method = null, array $params = [] ) _ftp Wrapper for FTP methods for testing
_getFtp ( string $host, integer $port = 22 ) : Net_SFTP FtpSource::_getFtp()
_parseSSH ( $rawlist = [], string $path = '' ) : array _parseSSH Normalizes the results from SFTP->rawlist
_parsels ( mixed $ls = null, string $path = '' ) : array _parsels Parses results from ls command into array
getAbsolutePath ( string $path ) : string An realpath() implementaion without needing local file/dir existance

Method Details

__construct() public méthode

__construct
public __construct ( array $config )
$config array

__destruct() public méthode

__destruct Quits
public __destruct ( )

_chmodnum() protected méthode

_chmodnum
Author: tmp at gmx dot de
protected _chmodnum ( string $chmod ) : string
$chmod string
Résultat string

_ftp() protected méthode

_ftp Wrapper for FTP methods for testing
protected _ftp ( string $method = null, array $params = [] )
$method string
$params array

_getFtp() protected méthode

Allows mocking of the ssh ftp class.
protected _getFtp ( string $host, integer $port = 22 ) : Net_SFTP
$host string
$port integer
Résultat Net_SFTP Instance

_parseSSH() protected méthode

_parseSSH Normalizes the results from SFTP->rawlist
protected _parseSSH ( $rawlist = [], string $path = '' ) : array
$path string
Résultat array

_parsels() protected méthode

You can override this in your Model by adding the method parseFtpResults($raw = array(), $path = null, $config = array()) : array()
protected _parsels ( mixed $ls = null, string $path = '' ) : array
$ls mixed
$path string
Résultat array

calculate() public méthode

calculate
public calculate ( Object $model, mixed $func, array $params = [] ) : array
$model Object
$func mixed
$params array
Résultat array

connect() public méthode

connect
public connect ( array $config = [] ) : boolean
$config array
Résultat boolean

console() public méthode

console
public console ( string $cmd = null ) : string
$cmd string
Résultat string

create() public méthode

create Upload/Download
public create ( Model $model, array $fields = null, array $values = null ) : boolean
$model Model
$fields array
$values array
Résultat boolean

delete() public méthode

delete Deletes a remote file
public delete ( Model $model, str $file = null ) : boolean
$model Model
$file str
Résultat boolean

describe() public méthode

describe Dynamically describes _schema
public describe ( obj $model )
$model obj

getAbsolutePath() protected méthode

An realpath() implementaion without needing local file/dir existance
protected getAbsolutePath ( string $path ) : string
$path string
Résultat string

init() public méthode

init Merges config
public init ( array $config = [] ) : boolean
$config array
Résultat boolean

listSources() public méthode

listSources
public listSources ( $data = null )

query() public méthode

query Provides an interface to datasource methods.
public query ( string $query = null, array $data = null ) : mixed
$query string
$data array
Résultat mixed

quit() public méthode

quit Closes and cleans up
public quit ( ) : boolean
Résultat boolean

read() public méthode

read Find files on remote server
public read ( Model $model, array $queryData = [], $recursive = null ) : array
$model Model
$queryData array
Résultat array

update() public méthode

update Upload/Download after find
public update ( Model $model, array $fields = null, array $values = null, array $conditions = null ) : boolean
$model Model
$fields array
$values array
$conditions array
Résultat boolean

Property Details

$_schema protected_oe property

_schema Default schema
protected array $_schema
Résultat array

$config public_oe property

config
public array $config
Résultat array

$description public_oe property

description
public string $description
Résultat string