Svn
in package
Tags
Table of Contents
- MAX_QTY_AUTH_TRIES = 5
- $cacheCredentials : bool
- $config : Config
- $credentials : array<string|int, mixed>
- $hasAuth : bool
- $io : IOInterface
- $process : ProcessExecutor
- $qtyAuthTries : int
- $url : string
- $version : string|null
- __construct() : mixed
- binaryVersion() : string|null
- Returns the version of the svn binary contained in PATH
- cleanEnv() : mixed
- execute() : string
- Execute an SVN remote command and try to fix up the process with credentials if necessary.
- executeLocal() : string
- Execute an SVN local command and try to fix up the process with credentials if necessary.
- setCacheCredentials() : mixed
- doAuthDance() : Svn
- Repositories requests credentials, let's put them in.
- getAuthCache() : string
- Return the no-auth-cache switch.
- getCommand() : string
- A method to create the svn commands run.
- getCredentialString() : string
- Return the credential string for the svn command.
- getPassword() : string
- Get the password for the svn command. Can be empty.
- getUsername() : string
- Get the username for the svn command.
- hasAuth() : bool
- Detect Svn Auth.
- createAuthFromConfig() : bool
- Create the auth params from the configuration file.
- createAuthFromUrl() : bool
- Create the auth params from the url
- executeWithAuthRetry() : mixed
Constants
MAX_QTY_AUTH_TRIES
public
mixed
MAX_QTY_AUTH_TRIES
= 5
Properties
$cacheCredentials
protected
bool
$cacheCredentials
= true
$config
protected
Config
$config
$credentials
protected
array<string|int, mixed>
$credentials
$hasAuth
protected
bool
$hasAuth
$io
protected
IOInterface
$io
$process
protected
ProcessExecutor
$process
$qtyAuthTries
protected
int
$qtyAuthTries
= 0
$url
protected
string
$url
$version
private
static string|null
$version
Methods
__construct()
public
__construct(string $url, IOInterface $io, Config $config[, ProcessExecutor $process = null ]) : mixed
Parameters
- $url : string
- $io : IOInterface
- $config : Config
- $process : ProcessExecutor = null
Return values
mixed —binaryVersion()
Returns the version of the svn binary contained in PATH
public
binaryVersion() : string|null
Return values
string|null —cleanEnv()
public
static cleanEnv() : mixed
Return values
mixed —execute()
Execute an SVN remote command and try to fix up the process with credentials if necessary.
public
execute(string $command, string $url[, string $cwd = null ][, string $path = null ][, bool $verbose = false ]) : string
Parameters
- $command : string
-
SVN command to run
- $url : string
-
SVN url
- $cwd : string = null
-
Working directory
- $path : string = null
-
Target for a checkout
- $verbose : bool = false
-
Output all output to the user
Tags
Return values
string —executeLocal()
Execute an SVN local command and try to fix up the process with credentials if necessary.
public
executeLocal(string $command, string $path[, string $cwd = null ][, bool $verbose = false ]) : string
Parameters
- $command : string
-
SVN command to run
- $path : string
-
Path argument passed thru to the command
- $cwd : string = null
-
Working directory
- $verbose : bool = false
-
Output all output to the user
Tags
Return values
string —setCacheCredentials()
public
setCacheCredentials(bool $cacheCredentials) : mixed
Parameters
- $cacheCredentials : bool
Return values
mixed —doAuthDance()
Repositories requests credentials, let's put them in.
protected
doAuthDance() : Svn
Tags
Return values
Svn —getAuthCache()
Return the no-auth-cache switch.
protected
getAuthCache() : string
Return values
string —getCommand()
A method to create the svn commands run.
protected
getCommand(string $cmd, string $url[, string $path = null ]) : string
Parameters
- $cmd : string
-
Usually 'svn ls' or something like that.
- $url : string
-
Repo URL.
- $path : string = null
-
Target for a checkout
Return values
string —getCredentialString()
Return the credential string for the svn command.
protected
getCredentialString() : string
Adds --no-auth-cache when credentials are present.
Return values
string —getPassword()
Get the password for the svn command. Can be empty.
protected
getPassword() : string
Tags
Return values
string —getUsername()
Get the username for the svn command.
protected
getUsername() : string
Tags
Return values
string —hasAuth()
Detect Svn Auth.
protected
hasAuth() : bool
Return values
bool —createAuthFromConfig()
Create the auth params from the configuration file.
private
createAuthFromConfig() : bool
Return values
bool —createAuthFromUrl()
Create the auth params from the url
private
createAuthFromUrl() : bool
Return values
bool —executeWithAuthRetry()
private
executeWithAuthRetry(mixed $svnCommand, mixed $cwd, mixed $url, mixed $path, mixed $verbose) : mixed
Parameters
- $svnCommand : mixed
- $cwd : mixed
- $url : mixed
- $path : mixed
- $verbose : mixed