8000 added doc comments · s7ntech/symfony@65cf3a0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 65cf3a0

Browse files
author
Christoph
committed
added doc comments
1 parent 8062031 commit 65cf3a0

File tree

1 file changed

+80
-1
lines changed

1 file changed

+80
-1
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,26 +610,51 @@ public function stop($timeout=10)
610610
return $this->exitcode;
611611
}
612612

613+
/**
614+
* Adds a line to the STDOUT stream
615+
*
616+
* @param string $line The line to append
617+
*/
613618
public function addOutput($line)
614619
{
615620
$this->stdout .= $line;
616621
}
617622

623+
/**
624+
* Adds a line to the STDERR stream
625+
*
626+
* @param string $line The line to append
627+
*/
618628
public function addErrorOutput($line)
619629
{
620630
$this->stderr .= $line;
621631
}
622632

633+
/**
634+
* Gets the command line to be executed
635+
*
636+
* @return string The command to execute
637+
*/
623638
public function getCommandLine()
624639
{
625640
return $this->commandline;
626641
}
627642

643+
/**
644+
* Sets the command line to be executed
645+
*
646+
* @param string $commandline The command to execute
647+
*/
628648
public function setCommandLine($commandline)
629649
{
630650
$this->commandline = $commandline;
631651
}
632652

653+
/**
654+
* Gets the process timeout
655+
*
656+
* @return integer|null The timeout in seconds or null if it's disabled
657+
*/
633658
public function getTimeout()
634659
{
635660
return $this->timeout;
@@ -640,7 +665,9 @@ public function getTimeout()
640665
*
641666
* To disable the timeout, set this value to null.
642667
*
643-
* @param integer|null
668+
* @param integer|null $timeout The timeout in seconds
669+
*
670+
* @throws \InvalidArgumentException if the timeout is negative
644671
*/
645672
public function setTimeout($timeout)
646673
{
@@ -659,51 +686,103 @@ public function setTimeout($timeout)
659686
$this->timeout = $timeout;
660687
}
661688

689+
/**
690+
* Gets the working directory
691+
*
692+
* @return string The current working directory
693+
*/
662694
public function getWorkingDirectory()
663695
{
664696
return $this->cwd;
665697
}
666698

699+
/**
700+
* Sets the current working directory
701+
*
702+
* @param string $cwd The new working directory
703+
*/
667704
public function setWorkingDirectory($cwd)
668705
{
669706
$this->cwd = $cwd;
670707
}
671708

709+
/**
710+
* Gets the environment variables
711+
*
712+
* @return array The current environment variables
713+
*/
672714
public function getEnv()
673715
{
674716
return $this->env;
675717
}
676718

719+
/**
720+
* Sets the environment variables
721+
*
722+
* @param array $env The new environment variables
723+
*/
677724
public function setEnv(array $env)
678725
{
679726
$this->env = $env;
680727
}
681728

729+
/**
730+
* Gets the contents of STDIN
731+
*
732+
* @return string The current contents
733+
*/
682734
public function getStdin()
683735
{
684736
return $this->stdin;
685737
}
686738

739+
/**
740+
* Sets the contents of STDIN
741+
*
742+
* @param string $stdin The new contents
743+
*/
687744
public function setStdin($stdin)
688745
{
689746
$this->stdin = $stdin;
690747
}
691748

749+
/**
750+
* Gets the options for proc_open
751+
*
752+
* @return array The current options
753+
*/
692754
public function getOptions()
693755
{
694756
return $this->options;
695757
}
696758

759+
/**
760+
* Sets the options for proc_open
761+
*
762+
* @param array $options The new options
763+
*/
697764
public function setOptions(array $options)
698765
{
699766
$this->options = $options;
700767
}
701768

769+
/**
770+
* Gets whether or not Windows compatibility is enabled
771+
*
772+
* This is true by default.
773+
*
774+
* @return Boolean
775+
*/
702776
public function getEnhanceWindowsCompatibility()
703777
{
704778
return $this->enhanceWindowsCompatibility;
705779
}
706780

781+
/**
782+
* Sets whether or not Windows compatibility is enabled
783+
*
784+
* @param Boolean $enhance
785+
*/
707786
public function setEnhanceWindowsCompatibility($enhance)
708787
{
709788
$this->enhanceWindowsCompatibility = (Boolean) $enhance;

0 commit comments

Comments
 (0)
0