Source

VersionControl_Hg / Trunk / Documentation / API / Html / Hg / Command / VersionControl_Hg_Command_Add.html

The default branch has multiple heads

<?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_Command_Add</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_Command_Add</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-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
                <p class="implements">
            Implements interfaces:
            <ul>
                <li><a href="../../Hg/Command/VersionControl_Hg_Command_Interface.html">VersionControl_Hg_Command_Interface</a></li>            </ul>
        </p>
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Add file(s) to a repository</p>
<p class="description"><p>Usage:  <div class="src-code"><ol><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/repo'</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">add</span><span class="src-sym">(</span><span class="src-str">'foo.txt'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">run</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-key">or</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">add</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'foo.txt'</span><span class="src-sym">,</span><span class="src-str">'bar.txt'</span><span class="src-sym">))</span><span class="src-sym">-&gt;</span><span class="src-id">run</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-key">or</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">add</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">files</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'foo.txt'</span><span class="src-sym">))</span><span class="src-sym">-&gt;</span><span class="src-id">run</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-key">or</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">add</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodexcluding">excluding</a><span class="src-sym">(</span><span class="src-str">'**.txt'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">run</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p><p>Should return a list of files added.</p><p>PHP version 5</p></p>
	<ul class="tags">
				<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---Command---Add.php.html">/Hg/Command/Add.php</a> (line <span class="field">59</span>)
		</p>
		
				
		<pre><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html">VersionControl_Hg_Command_Abstract</a>
   |
   --VersionControl_Hg_Command_Add</pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$allowed_options" title="details" class="var-name">$allowed_options</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$command" title="details" class="var-name">$command</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$required_options" title="details" class="var-name">$required_options</a>
				</div>
											</div>
		</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> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</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">mixed</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">null</span>], <span class="var-type"><a href="../../Hg/VersionControl_Hg.html">VersionControl_Hg</a></span>&nbsp;<span class="var-name">$hg</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#execute" title="details" class="method-name">execute</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">null</span>])
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$allowed_options" id="$allowed_options"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$allowed_options</span>
			 = <span class="var-default">array(<br /><br />    )</span>			(line <span class="line-number">90</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Permissable options.</p>
<p class="description"><p>The actual option must be the key, while 'null' is a value here to  accommodate the current implementation of setting options.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$command" id="$command"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$command</span>
			 = <span class="var-default"> 'add'</span>			(line <span class="line-number">68</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The name of the mercurial command implemented here</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$required_options" id="$required_options"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$required_options</span>
			 = <span class="var-default">array(<br />        'noninteractive' =&gt; null,<br />        'repository' =&gt; null,<br />    )</span>			(line <span class="line-number">77</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Required options for this specific command. These may not be required  by Mercurial itself, but are required for the proper functioning of  this package.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#var$required_options">VersionControl_Hg_Command_Abstract::$required_options</a></dt>
						<dd>Required options this command needs</dd>
					</dl>
		
		

</div>
							<h4>Inherited Variables</h4>
				<A NAME='inherited_vars'><!-- --></A>
									<p>Inherited from <span class="classname"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html">VersionControl_Hg_Command_Abstract</a></span></p>
					<blockquote>
													<span class="var-title">
								<span class="var-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#var$command_string">VersionControl_Hg_Command_Abstract::$command_string</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#var$global_options">VersionControl_Hg_Command_Abstract::$global_options</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#var$hg">VersionControl_Hg_Command_Abstract::$hg</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#var$optional_options">VersionControl_Hg_Command_Abstract::$optional_options</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#var$options">VersionControl_Hg_Command_Abstract::$options</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#var$output">VersionControl_Hg_Command_Abstract::$output</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#var$output_format">VersionControl_Hg_Command_Abstract::$output_format</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#var$status">VersionControl_Hg_Command_Abstract::$status</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#var$valid_options">VersionControl_Hg_Command_Abstract::$valid_options</a></span><br>
							</span>
											</blockquote> 
										
		</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-var-summary">Vars</a> (<a href="#sec-vars">details</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">102</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</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">mixed</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">null</span>], <span class="var-type"><a href="../../Hg/VersionControl_Hg.html">VersionControl_Hg</a></span>&nbsp;<span class="var-name">$hg</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$params</span><span class="var-description">: Options passed to the Log command</span>			</li>
					<li>
				<span class="var-type"><a href="../../Hg/VersionControl_Hg.html">VersionControl_Hg</a></span>
				<span class="var-name">$hg</span><span class="var-description">: Instance of the base object</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#method__construct">VersionControl_Hg_Command_Abstract::__construct()</a></dt>
						<dd>Class constructors must be redefined in each Command parent class,  since it must have its dependencies for $hg injected.</dd>
					</dl>
			
	</div>
<a name="methodexecute" id="execute"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">execute</span> (line <span class="line-number">115</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Execute the command and return the results.</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">
			execute
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$params</span><span class="var-description">: The options passed to the Log command</span>			</li>
				</ul>
		
				<hr class="separator" />
		<div class="notes">Implementation of:</div>
			<dl>
			<dt><a href="../../Hg/Command/VersionControl_Hg_Command_Interface.html#methodexecute">VersionControl_Hg_Command_Interface::execute()</a></dt>
						<dd>Main method encapsulating the logic to run the command</dd>
					</dl>
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html">VersionControl_Hg_Command_Abstract</a></span></p>
					<blockquote>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#method__construct">VersionControl_Hg_Command_Abstract::__construct()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodaddOption">VersionControl_Hg_Command_Abstract::addOption()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodaddOptions">VersionControl_Hg_Command_Abstract::addOptions()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodchangeset">VersionControl_Hg_Command_Abstract::changeset()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodexcluding">VersionControl_Hg_Command_Abstract::excluding()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodformat">VersionControl_Hg_Command_Abstract::format()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodformatOptions">VersionControl_Hg_Command_Abstract::formatOptions()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodgetCommandString">VersionControl_Hg_Command_Abstract::getCommandString()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodgetOption">VersionControl_Hg_Command_Abstract::getOption()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodgetOptions">VersionControl_Hg_Command_Abstract::getOptions()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodincluding">VersionControl_Hg_Command_Abstract::including()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodparseOutput">VersionControl_Hg_Command_Abstract::parseOutput()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodsetCommandString">VersionControl_Hg_Command_Abstract::setCommandString()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodsetOptions">VersionControl_Hg_Command_Abstract::setOptions()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#methodunsetOption">VersionControl_Hg_Command_Abstract::unsetOption()</a></span><br>
													<span class="method-name"><a href="../../Hg/Command/VersionControl_Hg_Command_Abstract.html#method__call">VersionControl_Hg_Command_Abstract::__call()</a></span><br>
											</blockquote>
										
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Mon, 27 Jun 2011 14:22:35 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.