Introduction Change History
Documentation is available at std_config1.inc.php
<?php /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SVN Web Control Copyright ©2006 by sTEFANs Created on 26.02.2006 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /** * This file contains sample implementation for a project configuration * for Test Project 1. * <b>Please have a close look to this file for details on <i>SwcConfig</i></b>. * * @package Swc * @subpackage Config * @author Stefan Schraml * @copyright Copyright ©2006 by sTEFANs * @license http://opensource.org/licenses/lgpl-license.php GNU General Public License * @version v1.1.0 * @since v1.0.0 */ /** Interfaces for configuration. */ require_once ('inc/config.inc.php'); /** * This class implements a sample configuration * for Test Project 1. * Common configurations are done within class * "SwcConfigAdapter" in file "inc/config.inc.php". * @see config.inc.php * @see SwcConfig * * @package Swc * @subpackage Config * @version v1.1.0 * @since v1.0.0 */ class TestProject1Config extends SwcConfigAdapter { /** Returns a user friendly name for the project. * @return string User friendly project name. * * @since v1.0.0 */ public function GetProjectName(){ return "SVN Web Control Test 1"; } /** Returns the relative URL of the Webpage under control. * @return string URL of page to display in MainFrame. * * @since v1.0.0 */ public function GetMainFrame(){ return '../test_project1/test.html'; } /** * Returns the HTTP URL of the repository for the main frame. * @return string URL of repository. * * @since v1.0.0 */ public function GetRepositoryRoot(){ return 'http://your-svn-server/svn_web_control'; } /** * Returns the absolute path of the repository in the local file system. * @return string Absolute path of the repository. * * @since v1.0.0 */ public function GetRepositoryRootDir(){ return '/path-to-repository/svn_web_control'; } /* * Configured in SwcConfigAdapter but can be overwritten here. * * Returns subdirectories which contains directories for tags. * @return array or string (Array of) repository directory that contains tags. * * @since v1.0.0 public function GetTagDirs(){ return 'tags/'; } */ /* * Configured in SwcConfigAdapter but can be overwritten here. * * Returns the maximum depth of directories that should be considered * as tag directory underneath <b>GetTagDirs()</b> hierarchy. * E.g. if this is set to 2 than GetTagDirs()/dir1/dir2 is considered * as tag directory while GetTagDirs()/dir1/dir2/dir3 is not. * @return int Maximal path depth for tag directories. * * @since v1.0.0 public function GetMaxTagDirDepth(){ return 1; } */ /* * Configured in SwcConfigAdapter but can be overwritten here. * * Returns subdirectories which contains directories for branches. * @return array or string (Array of) repository directory that contains branches. * * @since v1.0.0 public function GetBranchDirs(){ return 'branches/'; } */ /* * Configured in SwcConfigAdapter but can be overwritten here. * * Returns the maximum depth of directories that should be considered * as branch directory underneath <b>GetBranchDirs()</b> hierarchy. * E.g. if this is set to 2 than GetBranchDirs()/dir1/dir2 is considered * as tag directory while GetBranchDirs()/dir1/dir2/dir3 is not. * @return int Maximal path depth for branch directories. * * @since v1.0.0 public function GetMaxBranchDirDepth(){ return 0; } */ /* * Configured in SwcConfigAdapter but can be overwritten here. * * Returns subdirectoy which contains repository trunk. * @return string Repository directory that contains main developement. * * @since v1.0.0 public function GetTrunkDir(){ return 'trunk/'; } */ /** * Returns the HTTP URL for the workspace where the project * is checked out. Used by SVN. * @return string URL of Webspace. * @deprecated v1.1.0 Use <i>GetWebspaceRootDir</i> instead to configure * webspace. * @see SwcConfig::GetWebspaceRootDir * @since v1.0.0 */ public function GetWebspaceRoot(){ return 'http://your-webspace/'; } /** * Returns the absolute path of the workspace directory in the local file system. * @return string Absolute path of the workspace. * <br> * <b>Note:</b> <i>public function GetWebspaceRoot</i> is deprecated * and removed from <i>SwcConfig</i> interface in SWC v1.1.0. * Please use <i>GetWebspaceRootDir</i> instead. * @since v1.0.0 */ public function GetWebspaceRootDir(){ return '/path-to-your-webspace/'; } /* * Configured in SwcConfigAdapter but can be overwritten here. * * Returns the SVN user which should be used for repository access. * @return string SVN user. * * @since v1.0.0 public function GetSvnUser(){ return 'swc_user'; } */ /* * Configured in SwcConfigAdapter but can be overwritten here. * * Returns the password of the SVN user which should be used for repository access. * @return string Password of SVN user. * * @since v1.0.0 public function GetSvnPassword(){ return 'swc_password'; } */ /** * Returns the URL of WebSVN view for this project or NULL if WebSVN is not available. * * @since v1.0.0 */ public function GetWebSvnUrl(){ return 'http://websvn-location?project-params'; } /* * Configured in SwcConfigAdapter but can be overwritten here. * * Returns true if SVN command bar may be shown, false otherwise. * This setting overrides corresponding user setting in order to * protect the system agaist malicious commands. * * @since v1.0.0 public function IsSvnCommandBarEnabled(){ return true; } */ } ?>