phpdoc/Library/Command.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Library\Command | Library</title>
<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="../css/sami.css">
<script src="../js/jquery-1.11.1.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/typeahead.min.js"></script>
<script src="../sami.js"></script>
<meta name="MobileOptimized" content="width">
<meta name="HandheldFriendly" content="true">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
</head>
<body id="class" data-name="class:Library_Command" data-root-path="../">
<div id="content">
<div id="left-column">
<div id="control-panel">
<form id="search-form" action="../search.html" method="GET">
<span class="glyphicon glyphicon-search"></span>
<input name="search"
class="typeahead form-control"
type="search"
placeholder="Search">
</form>
</div>
<div id="api-tree"></div>
</div>
<div id="right-column">
<nav id="site-nav" class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">Library</a>
</div>
<div class="collapse navbar-collapse" id="navbar-elements">
<ul class="nav navbar-nav">
<li><a href="../classes.html">Classes</a></li>
<li><a href="../namespaces.html">Namespaces</a></li>
<li><a href="../interfaces.html">Interfaces</a></li>
<li><a href="../traits.html">Traits</a></li>
<li><a href="../doc-index.html">Index</a></li>
<li><a href="../search.html">Search</a></li>
</ul>
</div>
</div>
</nav>
<div class="namespace-breadcrumbs">
<ol class="breadcrumb">
<li><span class="label label-default">class</span></li>
<li><a href="../Library.html">Library</a></li>
<li>Command</li>
</ol>
</div>
<div id="page-content">
<div class="page-header">
<h1>Command</h1>
</div>
<p> class
<strong>Command</strong>
</p>
<div class="description">
<p>Largely inspired from <a href="http://github.com/kbjr/Git.php">http://github.com/kbjr/Git.php</a></p> </div>
<h2>Methods</h2>
<div class="container-fluid underlined">
<div class="row">
<div class="col-md-2 type">
</div>
<div class="col-md-8 type">
<a href="#method_addCache">addCache</a>($command, $result, $error, $status, $cwd = null, $env = null, $options = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
</div>
<div class="col-md-8 type">
<a href="#method_isCached">isCached</a>($command, $cwd = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
</div>
<div class="col-md-8 type">
<a href="#method_getCached">getCached</a>($command, $cwd = null)
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
</div>
<div class="col-md-8 type">
<a href="#method_getCache">getCache</a>()
<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
array
</div>
<div class="col-md-8 type">
<a href="#method_run">run</a>(
string $command,
string $path = null,
bool $force = false)
<p>Run a command on a Linux/UNIX system reading it from cache if so</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
array
</div>
<div class="col-md-8 type">
<a href="#method_runCommand">runCommand</a>(
string $command,
string $path = null)
<p>Run a command on a Linux/UNIX system</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
static
string
</div>
<div class="col-md-8 type">
<a href="#method_getCommandPath">getCommandPath</a>(
string $cmd)
<p>Get the system path of a command</p> </div>
<div class="col-md-2"></div>
</div>
</div>
<h2>Details</h2>
<div id="method-details">
<div class="method-item">
<h3 id="method_addCache">
<div class="location">at line 42</div>
<code>
<strong>addCache</strong>($command, $result, $error, $status, $cwd = null, $env = null, $options = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td></td>
<td>$command</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$result</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$error</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$status</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$cwd</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$env</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$options</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_isCached">
<div class="location">at line 55</div>
<code>
<strong>isCached</strong>($command, $cwd = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td></td>
<td>$command</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$cwd</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getCached">
<div class="location">at line 69</div>
<code>
<strong>getCached</strong>($command, $cwd = null)</code>
</h3>
<div class="details">
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td></td>
<td>$command</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$cwd</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getCache">
<div class="location">at line 75</div>
<code>
<strong>getCache</strong>()</code>
</h3>
<div class="details">
<div class="tags">
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_run">
<div class="location">at line 92</div>
<code>
array
<strong>run</strong>(
string $command,
string $path = null,
bool $force = false)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Run a command on a Linux/UNIX system reading it from cache if so</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$command</td>
<td>The command to run</td>
</tr>
<tr>
<td>
string</td>
<td>$path</td>
<td>The path to go to</td>
</tr>
<tr>
<td>
bool</td>
<td>$force</td>
<td>Force the command to really run (avoid caching)</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
array</td>
<td>An array like ( stdout , status , stderr )</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_runCommand">
<div class="location">at line 110</div>
<code>
array
<strong>runCommand</strong>(
string $command,
string $path = null)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Run a command on a Linux/UNIX system</p> <p>Accepts a shell command to run</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$command</td>
<td>The command to run</td>
</tr>
<tr>
<td>
string</td>
<td>$path</td>
<td>The path to go to</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
array</td>
<td>An array like ( stdout , status , stderr )</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getCommandPath">
<div class="location">at line 138</div>
<code> static
string
<strong>getCommandPath</strong>(
string $cmd)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Get the system path of a command</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$cmd</td>
<td>The command name to retrieve</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>The realpath of the command in the system</td>
</tr>
</table>
<h4>Exceptions</h4>
<table class="table table-condensed">
<tr>
<td><a href="../Library/CommandNotFoundException.html"><abbr title="Library\CommandNotFoundException">CommandNotFoundException</abbr></a></td>
<td>if the command doesn't exist</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>.
</div>
</div>
</div>
</body>
</html>