PHP SVN CLIENT
This class is a SVN client. It can perform read operations to a SVN server (over Web-DAV). It can get directory files, file contents, logs. All the operaration could be done for a specific version or for the last version.
author | Cesar D. Rodas <cesar@sixdegrees.com.br> @license BSD License |
---|
__construct($url, $user, $pass)
checkOut($folder, $outPath)
getDirectoryFiles(string $folder, $version)
This method returns all the files in $folder in the version $version of the repository.
string
Folder to get files @param integer $version Repository version, -1 means actual @return array List of files.
getDirectoryTree(string $folder, $version, $recursive)
This method returns the complete tree of files and directories in $folder from the version $version of the repository. Can also be used to get the info for a single file or directory
string
Folder to get tree @param integer $version Repository version, -1 means actual @param boolean $recursive Whether to get the tree recursively, or just the specified directory/file. @return array List of files and directories.
getFile($file, integer $version)
@param string $file File pathname
integer
File Version @return string File content and information, false on error, or if a directory is requested
getFileLogs(\@param $file, $vini, $vend)
Get repository change of a file between version $vini and $vend.
\@param
integer $vini Initial Version @param integer $vend End Version @return Array Respository Logs
getRepositoryLogs(integer $vini, $vend)
Get repository change logs between version $vini and $vend.
integer
Initial Version @param integer $vend End Version @return Array Respository Logs
getVersion()
@return integer Repository version
access | public |
---|
phpsvnclient($url, $user, $pass)
rawDirectoryDump(string $folder, $version)
This method dumps SVN data for $folder in the version $version of the repository.
string
Folder to get data @param integer $version Repository version, -1 means actual @return array SVN data dump.
setAuth($user, string $pass)
@param string $user Username
string
Password
setRepository(string $url)
Set the project repository URL.
string
URL of the project. @access public
setRespository($url)
This is now a wrapper for setRepository
Request(Array $args, $headers, $body)
@param Array $args Connetion's argument
Array
&$headers Array with the header response. @param string &$body Body response. @return boolean True is query success @access private
cleanURL(string $url)
Delete "//" on URL requests.
string
URL @return string New cleaned URL. @access private
initQuery($arguments, string $method, $url)
@param array &$arguments Byreferences variable.
string
Method for the request (GET,POST,PROPFIND, REPORT,ETC). @param string $url URL for the action. @access private
storeDirectoryFiles($item, $key)
@access private
$_cache
@var string
access | private |
---|
$_http
@var object
access | private |
---|
$_repVersion : \interger
@access private
$_url
@var string
access | private |
---|
$lastDirectoryFiles
$pass : string
@access private
$storeDirectoryFiles
$user : string
@access private