Source

VersionControl_Hg / src / Documentation / API / Html / Hg / VersionControl_Hg.html

The default branch has multiple heads

Full commit
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class VersionControl_Hg</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class VersionControl_Hg</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Base class to begin the fluent API</p>
<p class="description"><p>This package interfaces with the Mercurial command-line binary, which  must be installed on the same system as this package. The author of Mercurial  is on record preferring that all non-python programs interface with the  CLI binary.</p><p>There are no C-bindings, so a PECL extension is unlikely, as is a pure PHP  implementation due to the tremendous workload involved in keeping up with  changes Mercurial.</p><p>Usage:  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-inc">require_once&nbsp;</span><span class="src-str">'VersionControl/Hg.php'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$hg&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../Hg/VersionControl_Hg.html">VersionControl_Hg</a></span><span class="src-sym">(</span><span class="src-str">'/path/to/repository'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p><p>Setting the repository also automatically finds and sets the local  path of the Mercurial binary it will use. If multiple installations of  Mercurial are found, this package will employ only the first found on the  system path.</p><p>You may also provide a location of a repository after instantiation:  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-inc">require_once&nbsp;</span><span class="src-str">'VersionControl/Hg.php'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$hg&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../Hg/VersionControl_Hg.html">VersionControl_Hg</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$hg</span><span class="src-sym">-&gt;</span><span class="src-id">setRepository</span><span class="src-sym">(</span><span class="src-str">'/path/to/repository'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div>  or  <div class="src-code"><ol><li><div class="src-line"><span class="src-var">$hg</span><span class="src-sym">-&gt;</span><span class="src-id">repository&nbsp;</span>=&nbsp;<span class="src-str">'/path/to/repository'</span><span class="src-sym">;</span></div></li>
</ol></div></p><p>Calling all commands other than 'version' without having already set a  valid repository will raise an exception.</p><p>PHP version 5</p></p>
	<ul class="tags">
				<li><span class="field">tutorial:</span> Instantiating.html</li>
				<li><span class="field">author:</span> Michael Gatto &lt;<a href="mailto:mgatto@lisantra.com">mgatto@lisantra.com</a>&gt;</li>
				<li><span class="field">copyright:</span> 2011 Lisantra Technologies, LLC</li>
				<li><span class="field">link:</span> <a href="http://pear.php.net/package/VersionControl_Hg">http://pear.php.net/package/VersionControl_Hg</a></li>
				<li><span class="field">license:</span> <a href="http://www.opensource.org/licenses/mit-license.html">MIT License</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Hg.php.html">/Hg.php</a> (line <span class="field">82</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																												
												<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$repository</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
											<span class="method-result"><a href="../Hg/Command/VersionControl_Hg_Command_Abstract.html">VersionControl_Hg_Command_Abstract</a></span>
										<a href="#__call" title="details" class="method-name">__call</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$method</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$arguments</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#__get" title="details" class="method-name">__get</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#__set" title="details" class="method-name">__set</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#__toString" title="details" class="method-name">__toString</a>
										()
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">104</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<p class="description"><p>Assumes it will be working on a local filesystem repository</p><p>The repository path is optional in the constructor.  It can be set with an explicit setting of the repository's path.  You can only set the path once since Repository is a singleton;  All subsqeuent attempts will silently fail after one of the below  has been performed:  <div class="src-code"><ol><li><div class="src-line"><span class="src-var">$hg</span><span class="src-sym">-&gt;</span><span class="src-id">setRepository</span><span class="src-sym">(</span><span class="src-str">'/path/to/repository'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div>  or  <div class="src-code"><ol><li><div class="src-line"><span class="src-var">$hg</span><span class="src-sym">-&gt;</span><span class="src-id">repository</span><span class="src-sym">-&gt;</span><span class="src-id">setPath</span><span class="src-sym">(</span><span class="src-str">'/path/to/repository'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div>  or  <div class="src-code"><ol><li><div class="src-line"><span class="src-var">$hg</span><span class="src-sym">-&gt;</span><span class="src-id">repository&nbsp;</span>=&nbsp;<span class="src-str">'/path/to/repository'</span><span class="src-sym">;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__construct
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$repository</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$repository</span><span class="var-description">: Optional path to a mercurial repository.</span>			</li>
				</ul>
		
			
	</div>
<a name="method__call" id="__call"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">__call</span> (line <span class="line-number">133</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Proxy down to the command class</p>
<p class="description"><p>This also allows programmers to use both  <div class="src-code"><ol><li><div class="src-line"><span class="src-var">$executables_object&nbsp;</span>=&nbsp;<span class="src-var">$hg</span><span class="src-sym">-&gt;</span><span class="src-id">executable</span><span class="src-sym">;</span></div></li>
</ol></div>  and  <div class="src-code"><ol><li><div class="src-line"><span class="src-var">$executables_object&nbsp;</span>=&nbsp;<span class="src-var">$hg</span><span class="src-sym">-&gt;</span><span class="src-id">getExecutable</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div>  to both return an instance of VersionControl_Hg_Executable, for example.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Hg/Command/VersionControl_Hg_Command_Abstract.html">VersionControl_Hg_Command_Abstract</a></span>
		<span class="method-name">
			__call
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$method</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$arguments</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$method</span><span class="var-description">: The function being called</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$arguments</span><span class="var-description">: The parameters passed to that function</span>			</li>
				</ul>
		
			
	</div>
<a name="method__get" id="__get"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__get</span> (line <span class="line-number">194</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an object, usually handled by a command</p>
<p class="description"><p>A $name is a lowercase, short name of the object:  $hg-&gt;executable is an instance of VersionControl_Hg_Executable and can  be echoed to invoke __toString() to get a pertinent piece of metadata.</p><p>Instead of calling:  <div class="src-code"><ol><li><div class="src-line"><span class="src-var">$hg</span><span class="src-sym">-&gt;</span><span class="src-id">getVersion</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div>,  we simplify:  <div class="src-code"><ol><li><div class="src-line"><span class="src-var">$version&nbsp;</span>=&nbsp;<span class="src-var">$hg</span><span class="src-sym">-&gt;</span><span class="src-id">version</span></div></li>
</ol></div>.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			__get
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The object to get</span>			</li>
				</ul>
		
			
	</div>
<a name="method__set" id="__set"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">__set</span> (line <span class="line-number">230</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Magic setter for properties of commands and more.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			__set
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The property's name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: The property's value</span>			</li>
				</ul>
		
			
	</div>
<a name="method__toString" id="__toString"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__toString</span> (line <span class="line-number">260</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Print out the class' properties</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			__toString
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Tue, 19 Jul 2011 14:21:21 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>