VersionControl_SVN
[ class tree: VersionControl_SVN ] [ index: VersionControl_SVN ] [ all elements ]

Class: VersionControl_SVN_Command

Source Location: /VersionControl_SVN-0.5.2/VersionControl/SVN/Command.php

Class Overview


Ground class for a SVN command.


Author(s):

Version:

  • 0.5.2

Copyright:

  • 2004-2007 Clay Loveless

Variables

Methods


Child classes:

VersionControl_SVN_Command_Propget
Subversion Propget command manager class
VersionControl_SVN_Command_Propdel
Subversion Propdel command manager class
VersionControl_SVN_Command_Move
Subversion Move command manager class
VersionControl_SVN_Command_Import
Subversion Import command manager class
VersionControl_SVN_Command_Merge
Subversion Merge command manager class
VersionControl_SVN_Command_Blame
Subversion Blame command manager class
VersionControl_SVN_Command_Changelist
Subversion Changelist command manager class
VersionControl_SVN_Command_Mkdir
Subversion Mkdir command manager class
VersionControl_SVN_Command_Log
Subversion Log command manager class
VersionControl_SVN_Command_Delete
Subversion Delete command manager class
VersionControl_SVN_Command_Add
Subversion Add command manager class
VersionControl_SVN_Command_Switch
Subversion Switch command manager class
VersionControl_SVN_Command_List
Subversion List command manager class
VersionControl_SVN_Command_Export
Subversion Export command manager class
VersionControl_SVN_Command_Revert
Subversion Revert command manager class
VersionControl_SVN_Command_Copy
Subversion Copy command manager class
VersionControl_SVN_Command_Info
Subversion Info command manager class
VersionControl_SVN_Command_Diff
Subversion Diff command manager class
VersionControl_SVN_Command_Cleanup
Subversion Cleanup command manager class
VersionControl_SVN_Command_Propset
Subversion Propset command manager class
VersionControl_SVN_Command_Commit
Subversion Commit command manager class
VersionControl_SVN_Command_Update
Subversion Update command manager class
VersionControl_SVN_Command_Cat
Subversion Cat command manager class
VersionControl_SVN_Command_Checkout
Subversion Checkout command manager class
VersionControl_SVN_Command_Status
Subversion Status command manager class
VersionControl_SVN_Command_Resolved
Subversion Resolved command manager class
VersionControl_SVN_Command_Proplist
Subversion Proplist command manager class

Inherited Variables

Inherited Methods


Class Details

[line 69]
Ground class for a SVN command.


[ Top ]


Class Variables

$args = array()

[line 126]

Command-line arguments that should be passed outside of those specified in switches.
  • Access: public

Type:   array


[ Top ]

$binaryPath =  '/usr/local/bin/svn'

[line 94]

Location of the svn client binary installed as part of Subversion
  • Access: public

Type:   string


[ Top ]

$commandName =  ''

[line 206]

SVN subcommand to run.
  • Access: protected

Type:   string


[ Top ]

$configDir =  null

[line 160]

Default config-dir to use for connections.
  • Access: public

Type:   string


[ Top ]

$configOption =  null

[line 167]

Default config-option to use for connections.
  • Access: public

Type:   string


[ Top ]

$fetchmode =  VERSIONCONTROL_SVN_FETCHMODE_ASSOC

[line 139]

Preferred fetchmode. Note that not all subcommands have output available for each preferred fetchmode. The default cascade is:

VERSIONCONTROL_SVN_FETCHMODE_ASSOC VERSIONCONTROL_SVN_FETCHMODE_RAW

If the specified fetchmode isn't available, raw output will be returned.

  • Access: public

Type:   int


[ Top ]

$minArgs =  0

[line 199]

Minimum number of args required by this subcommand.

See Version Control with Subversion, Subversion Complete Reference for details on arguments for this subcommand.

  • Access: protected

Type:   int


[ Top ]

$noAuthCache =  null

[line 174]

Default no-auth-cache to use for connections.
  • Access: public

Type:   string


[ Top ]

$options = array()

[line 118]

Runtime options being used.
  • Access: public

Type:   array


[ Top ]

$passthru =  false

[line 87]

Use exec or passthru to get results from command.
  • Access: public

Type:   bool


[ Top ]

$password =  null

[line 153]

Default password to use for connections.
  • Access: public

Type:   string


[ Top ]

$preparedCmd =  ''

[line 213]

Fully prepared command string.
  • Access: protected

Type:   string


[ Top ]

$prependCmd =  ''

[line 104]

String to prepend to command string. Helpful for setting exec() environment variables, such as: export LANG=en_US.utf8 && ... to support non-ASCII file and directory names.
  • Access: public

Type:   string


[ Top ]

$requiredSwitches = array()

[line 190]

Switches required by this subcommand.

See Version Control with Subversion, Subversion Complete Reference for details on arguments for this subcommand.

  • Access: protected

Type:   array


[ Top ]

$switches = array()

[line 111]

Array of switches to use in building svn command
  • Access: public

Type:   array


[ Top ]

$trustServerCert =  false

[line 181]

Default trust-server-cert to use for connections.
  • Access: public

Type:   string


[ Top ]

$useEscapeshellcmd =  true

[line 80]

Indicates whether commands passed to the exec() function in the run method should be passed through escapeshellcmd().

NOTE: this variable is ignored on Windows machines!

  • Access: public

Type:   boolean


[ Top ]

$username =  null

[line 146]

Default username to use for connections.
  • Access: public

Type:   string


[ Top ]

$validSwitches = array(
        'no-auth-cache',
        'non-interactive',
        'trust-server-cert',
    )

[line 235]

Useable switches for command without parameters.
  • Access: protected

Type:   mixed


[ Top ]

$validSwitchesValue = array(
        'username',
        'password',
        'config-dir',
        'config-option',
    )

[line 225]

Useable switches for command with parameters.
  • Access: protected

Type:   mixed


[ Top ]

$xmlAvail =  false

[line 220]

Keep track of whether XML output is available for a command
  • Access: protected

Type:   boolean


[ Top ]



Method Detail

__construct (Constructor)   [line 244]

VersionControl_SVN_Command __construct( )

Constructor. Can't be called directly as class is abstract.
  • Access: public

Overridden in child classes as:

VersionControl_SVN_Command_Propget::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Propdel::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Move::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Import::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Merge::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Blame::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Changelist::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Mkdir::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Log::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Delete::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Add::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Switch::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_List::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Export::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Revert::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Copy::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Info::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Diff::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Cleanup::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Propset::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Commit::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Update::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Cat::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Checkout::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Status::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Resolved::__construct()
Constuctor of command. Adds available switches.
VersionControl_SVN_Command_Proplist::__construct()
Constuctor of command. Adds available switches.

[ Top ]

checkCommandRequirements   [line 407]

void checkCommandRequirements( )

Standardized validation of requirements for a command class.
  • Throws: VersionControl_SVN_Exception If command requirements not resolved.
  • Access: public

[ Top ]

fillSwitch   [line 391]

void fillSwitch( string $switchName, string $value)

Fills the switches array on given name with value if not already set and value is not null.
  • Access: protected

Parameters:

string   $switchName     Name of the switch.
string   $value     Value for the switch.

[ Top ]

parseOutput   [line 519]

mixed parseOutput( array $out)

Handles output parsing of standard and verbose output of command.
  • Return: Returns output requested by fetchmode (if available), or raw output if desired fetchmode is not available.
  • Access: public

Parameters:

array   $out     Array of output captured by exec command in run

[ Top ]

postProcessSwitches   [line 336]

void postProcessSwitches( array $invalidSwitches)

Called after handling switches.
  • Throws: VersionControl_SVN_Exception If switch(s) is/are invalid.
  • Access: protected

Parameters:

array   $invalidSwitches     Invalid switches found while processing.

[ Top ]

prepare   [line 295]

void prepare( )

Prepare the command switches.

This function should be overloaded by the command class.

  • Throws: VersionControl_SVN_Exception If preparing failed.
  • Access: public

[ Top ]

preProcessSwitches   [line 360]

void preProcessSwitches( )

Called before handling switches.
  • Access: protected

[ Top ]

run   [line 453]

mixed run( [array $args = array()], [array $switches = array()])

Run the command with the defined switches.
  • Return: specified output on success.
  • Throws: VersionControl_SVN_Exception If command failed.
  • Access: public

Parameters:

array   $args     Arguments to pass to Subversion
array   $switches     Switches to pass to Subversion

[ Top ]

setOptions   [line 264]

VersionControl_SVN_Command setOptions( [array $options = array()])

Allow for overriding of previously declared options.
  • Return: Themself.
  • Throws: VersionControl_SVN_Exception If option isn't available.
  • Access: public

Parameters:

array   $options     An associative array of option names and their values

[ Top ]


Documentation generated on Mon, 29 Sep 2014 09:00:04 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.