Skip to content

Commit

Permalink
Fluent interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilge authored and fabpot committed Oct 3, 2012
1 parent 0bfa86c commit 46d358f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/Symfony/Component/Process/Process.php
Expand Up @@ -614,11 +614,15 @@ public function stop($timeout=10)
public function addOutput($line)
{
$this->stdout .= $line;

return $this;
}

public function addErrorOutput($line)
{
$this->stderr .= $line;

return $this;
}

public function getCommandLine()
Expand All @@ -629,6 +633,8 @@ public function getCommandLine()
public function setCommandLine($commandline)
{
$this->commandline = $commandline;

return $this;
}

public function getTimeout()
Expand All @@ -648,7 +654,7 @@ public function setTimeout($timeout)
if (null === $timeout) {
$this->timeout = null;

return;
return $this;
}

$timeout = (integer) $timeout;
Expand All @@ -658,6 +664,8 @@ public function setTimeout($timeout)
}

$this->timeout = $timeout;

return $this;
}

public function getWorkingDirectory()
Expand All @@ -668,6 +676,8 @@ public function getWorkingDirectory()
public function setWorkingDirectory($cwd)
{
$this->cwd = $cwd;

return $this;
}

public function getEnv()
Expand All @@ -678,6 +688,8 @@ public function getEnv()
public function setEnv(array $env)
{
$this->env = $env;

return $this;
}

public function getStdin()
Expand All @@ -688,6 +700,8 @@ public function getStdin()
public function setStdin($stdin)
{
$this->stdin = $stdin;

return $this;
}

public function getOptions()
Expand All @@ -698,6 +712,8 @@ public function getOptions()
public function setOptions(array $options)
{
$this->options = $options;

return $this;
}

public function getEnhanceWindowsCompatibility()
Expand All @@ -708,6 +724,8 @@ public function getEnhanceWindowsCompatibility()
public function setEnhanceWindowsCompatibility($enhance)
{
$this->enhanceWindowsCompatibility = (Boolean) $enhance;

return $this;'
}
/**
Expand Down

0 comments on commit 46d358f

Please sign in to comment.