Overview

Namespaces

  • Jyxo
    • Beholder
      • TestCase
    • Gettext
      • Parser
    • Input
      • Chain
      • Filter
      • Validator
    • Mail
      • Email
        • Attachment
      • Parser
      • Sender
    • Rpc
      • Json
      • Xml
    • Shell
    • Spl
    • Svn
    • Time
    • Webdav
  • PHP

Classes

  • Client
  • Result

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Client

SVN client for PHP.

Does not use the php_svn extension, but executes SVN binaries directly.

Namespace: Jyxo\Svn
Category: Jyxo
Package: Jyxo\Svn
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Matěj Humpál
Author: Ondřej Nešpor
Located at Svn/Client.php
Methods summary
public
# __construct( string $user = '', string $password = '', array $additional = array(), string $svnBinary = '' )

Constructor.

Constructor.

Parameters

$user
string
SVN username
$password
string
SVN user password
$additional
array
Additional parameters
$svnBinary
string
SVN binary path
public Jyxo\Svn\Result
# checkout( string $url, string $path, mixed $params = null, string $user = '', string $password = '' )

SVN checkout.

SVN checkout.

Parameters

$url
string
Repository URL
$path
string
Local working copy path
$params
mixed
Additional parameters
$user
string
SVN username
$password
string
SVN user password

Returns

Jyxo\Svn\Result
public Jyxo\Svn\Result
# co( string $url, string $path, mixed $params = null, string $user = '', string $password = '' )

SVN checkout.

SVN checkout.

Parameters

$url
string
Repository URL
$path
string
Local working copy path
$params
mixed
Additional parameters
$user
string
SVN username
$password
string
SVN user password

Returns

Jyxo\Svn\Result
public Jyxo\Svn\Result
# update( string $path, mixed $params = null, string $user = '', string $password = '' )

SVN Update.

SVN Update.

Parameters

$path
string
Local working copy path
$params
mixed
Additional parameters
$user
string
SVN username
$password
string
SVN user password

Returns

Jyxo\Svn\Result
public Jyxo\Svn\Result
# up( string $path, mixed $params = null, string $user = '', string $password = '' )

SVN Update.

SVN Update.

Parameters

$path
string
Local working copy path
$params
mixed
Additional parameters
$user
string
SVN username
$password
string
SVN user password

Returns

Jyxo\Svn\Result
public Jyxo\Svn\Result
# commit( string $path, string $message, mixed $params = null, string $user = '', string $password = '' )

SVN commit.

SVN commit.

Parameters

$path
string
Local working copy path
$message
string
Commit message
$params
mixed
Additional parameters
$user
string
SVN username
$password
string
SVN user password

Returns

Jyxo\Svn\Result
public Jyxo\Svn\Result
# ci( string $path, string $message, mixed $params = null, string $user = '', string $password = '' )

SVN commit.

SVN commit.

Parameters

$path
string
Local working copy path
$message
string
Commit message
$params
mixed
Additional parameters
$user
string
SVN username
$password
string
SVN user password

Returns

Jyxo\Svn\Result
public Jyxo\Svn\Result
# add( array $path )

Runs SVN add on the given path.

Runs SVN add on the given path.

Parameters

$path
array
Path to be added to SVN

Returns

Jyxo\Svn\Result
public Jyxo\Svn\Result
# delete( array $path )

Runs SVN delete on the given path.

Runs SVN delete on the given path.

Parameters

$path
array
Path to be deleted from SVN

Returns

Jyxo\Svn\Result
public Jyxo\Svn\Result
# status( array $path )

Retrieves SVN status information of the given path.

Retrieves SVN status information of the given path.

Parameters

$path
array
Checked path

Returns

Jyxo\Svn\Result
protected Jyxo\Svn\Result
# callSvn( string $action, string $user, string $password, string $params )

Executes SVN binary with given parameters.

Executes SVN binary with given parameters.

Parameters

$action
string
Action
$user
string
Username
$password
string
User password
$params
string
Additional parameters

Returns

Jyxo\Svn\Result

Throws

Jyxo\Svn\Exception
On execute error
public Jyxo\Svn\Client
# setUser( string $user )

Sets SVN username.

Sets SVN username.

Parameters

$user
string
Username

Returns

Jyxo\Svn\Client
public Jyxo\Svn\Client
# setPassword( string $password )

Sets SVN user password.

Sets SVN user password.

Parameters

$password
string
Password

Returns

Jyxo\Svn\Client
public Jyxo\Svn\Client
# setAdditionalParams( array $params )

Sets additional parameters.

Sets additional parameters.

Parameters

$params
array
Array of parameters

Returns

Jyxo\Svn\Client
public Jyxo\Svn\Client
# setSvnBinary( string $path )

Sets SVN binary path.

Sets SVN binary path.

Parameters

$path
string
Path to the SVN binary

Returns

Jyxo\Svn\Client
public Jyxo\Svn\Client
# addAdditionalParam( string $param, string $value = '' )

Adds an additional parameter.

Adds an additional parameter.

Parameters

$param
string
Parameter name
$value
string
Parameter value

Returns

Jyxo\Svn\Client
protected string
# getUserString( mixed $user = '' )

Returns SVN username with the given value for use as SVN binary parameter.

Returns SVN username with the given value for use as SVN binary parameter.

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.

Parameters

$user
mixed
Username

Returns

string
protected string
# getPasswordString( mixed $password = '' )

Returns SVN user password with the given value for use as SVN binary parameter.

Returns SVN user password with the given value for use as SVN binary parameter.

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.

Parameters

$password
mixed
Password

Returns

string
protected string
# getAdditionalParams( mixed $params = array(), boolean $pathsOnly = false )

Returns additional parameters with the given value for use as SVN binary parameters.

Returns additional parameters with the given value for use as SVN binary parameters.

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.

Parameters

$params
mixed
Parameters
$pathsOnly
boolean
Use only path-parameters (not beginning with a dash "-")

Returns

string
Properties summary
protected string $user ''
#

SVN username.

SVN username.

protected string $password ''
#

SVN user password.

SVN user password.

protected array $additional array()
#

Additional SVN parameters.

Additional SVN parameters.

protected string $svnBinary '/usr/bin/svn'
#

Path to the SVN binary.

Path to the SVN binary.

Jyxo PHP Library API documentation generated by ApiGen 2.3.0