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

Class: VersionControl_SVN_Command

Source Location: /VersionControl_SVN-0.5.1/SVN/Command.php

Class Overview


Ground class for a SVN command.


Author(s):

Version:

  • 0.5.1

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 142]

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 199]

SVN subcommand to run.
  • Access: protected

Type:   string


[ Top ]

$configDir =  ''

[line 185]

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

Type:   string


[ Top ]

$configOption =  ''

[line 192]

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

Type:   string


[ Top ]

$fetchmode =  VERSIONCONTROL_SVN_FETCHMODE_ASSOC

[line 164]

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 151]

Minimum number of args required by this subcommand.

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

  • Access: public

Type:   int


[ Top ]

$options = array()

[line 134]

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 =  ''

[line 178]

Default password to use for connections.
  • Access: public

Type:   string


[ Top ]

$preparedCmd =  ''

[line 206]

Fully prepared command string.
  • Access: protected

Type:   string


[ Top ]

$prependCmd =  ''

[line 111]

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 127]

Switches required by this subcommand.

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

  • Access: public

Type:   array


[ Top ]

$svn_path =  ''

[line 101]

Legacy / compatibility location of the svn client binary
  • Access: public

Type:   string


[ Top ]

$switches = array()

[line 118]

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

Type:   array


[ 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 =  ''

[line 171]

Default username to use for connections.
  • Access: public

Type:   string


[ Top ]

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

[line 228]

Useable switches for command without parameters.
  • Access: protected

Type:   mixed


[ Top ]

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

[line 218]

Useable switches for command with parameters.
  • Access: protected

Type:   mixed


[ Top ]

$xmlAvail =  false

[line 213]

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

Type:   boolean


[ Top ]



Method Detail

__construct (Constructor)   [line 237]

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 389]

void checkCommandRequirements( )

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

[ Top ]

fillSwitch   [line 373]

void fillSwitch( $switchName, $value)

  • Access: protected

Parameters:

   $switchName     
   $value     

[ Top ]

parseOutput   [line 516]

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 331]

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 288]

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 355]

void preProcessSwitches( )

Called before handling switches.
  • Access: protected

[ Top ]

run   [line 442]

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 257]

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 Sat, 09 Feb 2013 12:30:09 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.