PHP Класс Jyxo\Svn\Client

Does not use the php_svn extension, but executes SVN binaries directly.
Автор: Matěj Humpál
Автор: Ondřej Nešpor
Показать файл Открыть проект

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

Свойство Тип Описание
$additional array Additional SVN parameters.
$password string SVN user password.
$svnBinary string Path to the SVN binary.
$user string SVN username.

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

Метод Описание
__construct ( string $user = '', string $password = '', array $additional = [], string $svnBinary = '' ) Constructor.
add ( array $path ) : Result Runs SVN add on the given path.
addAdditionalParam ( string $param, string $value = '' ) : Client Adds an additional parameter.
checkout ( string $url, string $path, mixed $params = null, string $user = '', string $password = '' ) : Result SVN checkout.
ci ( string $path, string $message, mixed $params = null, string $user = '', string $password = '' ) : Result SVN commit.
co ( string $url, string $path, mixed $params = null, string $user = '', string $password = '' ) : Result SVN checkout.
commit ( string $path, string $message, mixed $params = null, string $user = '', string $password = '' ) : Result SVN commit.
delete ( array $path ) : Result Runs SVN delete on the given path.
setAdditionalParams ( array $params ) : Client Sets additional parameters.
setPassword ( string $password ) : Client Sets SVN user password.
setSvnBinary ( string $path ) : Client Sets SVN binary path.
setUser ( string $user ) : Client Sets SVN username.
status ( array $path ) : Result Retrieves SVN status information of the given path.
up ( string $path, mixed $params = null, string $user = '', string $password = '' ) : Result SVN Update.
update ( string $path, mixed $params = null, string $user = '', string $password = '' ) : Result SVN Update.

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

Метод Описание
callSvn ( string $action, string $user, string $password, array $params ) : Result Executes SVN binary with given parameters.
getAdditionalParams ( array $params = [], boolean $pathsOnly = false ) : string Returns additional parameters with the given value for use as SVN binary parameters.
getPasswordString ( mixed $password = '' ) : string Returns SVN user password with the given value for use as SVN binary parameter.
getUserString ( mixed $user = '' ) : string Returns SVN username with the given value for use as SVN binary parameter.

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

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

Constructor.
public __construct ( string $user = '', string $password = '', array $additional = [], string $svnBinary = '' )
$user string SVN username
$password string SVN user password
$additional array Additional parameters
$svnBinary string SVN binary path

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

Runs SVN add on the given path.
public add ( array $path ) : Result
$path array Path to be added to SVN
Результат Result

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

Adds an additional parameter.
public addAdditionalParam ( string $param, string $value = '' ) : Client
$param string Parameter name
$value string Parameter value
Результат Client

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

Executes SVN binary with given parameters.
protected callSvn ( string $action, string $user, string $password, array $params ) : Result
$action string Action
$user string Username
$password string User password
$params array Additional parameters
Результат Result

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

SVN checkout.
public checkout ( string $url, string $path, mixed $params = null, string $user = '', string $password = '' ) : Result
$url string Repository URL
$path string Local working copy path
$params mixed Additional parameters
$user string SVN username
$password string SVN user password
Результат Result

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

SVN commit.
public ci ( string $path, string $message, mixed $params = null, string $user = '', string $password = '' ) : Result
$path string Local working copy path
$message string Commit message
$params mixed Additional parameters
$user string SVN username
$password string SVN user password
Результат Result

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

SVN checkout.
public co ( string $url, string $path, mixed $params = null, string $user = '', string $password = '' ) : Result
$url string Repository URL
$path string Local working copy path
$params mixed Additional parameters
$user string SVN username
$password string SVN user password
Результат Result

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

SVN commit.
public commit ( string $path, string $message, mixed $params = null, string $user = '', string $password = '' ) : Result
$path string Local working copy path
$message string Commit message
$params mixed Additional parameters
$user string SVN username
$password string SVN user password
Результат Result

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

Runs SVN delete on the given path.
public delete ( array $path ) : Result
$path array Path to be deleted from SVN
Результат Result

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

Parameters given in the argument have precedence over values stored in object's attribute. If parameters are given as arrays, they get merged. Returns empty string if no parameters are set in any way.
protected getAdditionalParams ( array $params = [], boolean $pathsOnly = false ) : string
$params array Parameters
$pathsOnly boolean Use only path-parameters (not beginning with a dash "-")
Результат string

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

Password given in the argument has precedence over the value stored in object's attribute. Returns empty string if no password is set in any way.
protected getPasswordString ( mixed $password = '' ) : string
$password mixed Password
Результат string

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

Username given in the argument has precedence over the value stored in object's attribute. Returns empty string if no username is set in any way.
protected getUserString ( mixed $user = '' ) : string
$user mixed Username
Результат string

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

Sets additional parameters.
public setAdditionalParams ( array $params ) : Client
$params array Array of parameters
Результат Client

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

Sets SVN user password.
public setPassword ( string $password ) : Client
$password string Password
Результат Client

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

Sets SVN binary path.
public setSvnBinary ( string $path ) : Client
$path string Path to the SVN binary
Результат Client

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

Sets SVN username.
public setUser ( string $user ) : Client
$user string Username
Результат Client

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

Retrieves SVN status information of the given path.
public status ( array $path ) : Result
$path array Checked path
Результат Result

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

SVN Update.
public up ( string $path, mixed $params = null, string $user = '', string $password = '' ) : Result
$path string Local working copy path
$params mixed Additional parameters
$user string SVN username
$password string SVN user password
Результат Result

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

SVN Update.
public update ( string $path, mixed $params = null, string $user = '', string $password = '' ) : Result
$path string Local working copy path
$params mixed Additional parameters
$user string SVN username
$password string SVN user password
Результат Result

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

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

Additional SVN parameters.
protected array $additional
Результат array

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

SVN user password.
protected string $password
Результат string

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

Path to the SVN binary.
protected string $svnBinary
Результат string

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

SVN username.
protected string $user
Результат string