Parcourir la source

[Process] moved protected to private

Fabien Potencier il y a 14 ans
Parent
commit
639d93cbbf

+ 2 - 2
src/Symfony/Component/Process/PhpProcess.php

@@ -41,7 +41,7 @@ class PhpProcess extends Process
      */
     public function setPhpBinary($php)
     {
-        $this->commandline = $php;
+        $this->setCommandLine($php);
     }
 
     /**
@@ -68,7 +68,7 @@ class PhpProcess extends Process
      *
      * @throws \RuntimeException When defined PHP_PATH is not executable or not found
      */
-    static public function getPhpBinary()
+    private function getPhpBinary()
     {
         if (getenv('PHP_PATH')) {
             if (!is_executable($php = getenv('PHP_PATH'))) {

+ 15 - 10
src/Symfony/Component/Process/Process.php

@@ -19,16 +19,16 @@ namespace Symfony\Component\Process;
  */
 class Process
 {
-    protected $commandline;
-    protected $cwd;
-    protected $env;
-    protected $stdin;
-    protected $timeout;
-    protected $options;
-    protected $exitcode;
-    protected $status;
-    protected $stdout;
-    protected $stderr;
+    private $commandline;
+    private $cwd;
+    private $env;
+    private $stdin;
+    private $timeout;
+    private $options;
+    private $exitcode;
+    private $status;
+    private $stdout;
+    private $stderr;
 
     /**
      * Constructor.
@@ -261,4 +261,9 @@ class Process
     {
         $this->stderr .= $line;
     }
+
+    public function setCommandLine($commandline)
+    {
+        $this->commandline = $commandline;
+    }
 }