Changeset 63 for trunk/Packages/Common/Process.php
- Timestamp:
- Aug 3, 2021, 11:20:41 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 nbproject2 Config.php3 1 .settings 4 2 .project 5 3 .buildpath 4 .htaccess
-
- Property svn:ignore
-
trunk/Packages/Common/Process.php
r56 r63 3 3 class Process 4 4 { 5 var$Command;6 var$Handle;7 var$Pipes;8 var$Environment;9 var$WorkingDir;10 5 public string $Command; 6 public $Handle; 7 public array $Pipes; 8 public array $Environment; 9 public ?string $WorkingDir; 10 11 11 function __construct() 12 12 { … … 17 17 $this->WorkingDir = null; 18 18 } 19 20 function Start() 19 20 function Start(): void 21 21 { 22 if (!$this->IsRunning())22 if (!$this->IsRunning()) 23 23 { 24 24 $DescriptorSpec = array( … … 28 28 ); 29 29 30 $this->Handle = proc_open($this->Command, $DescriptorSpec, $this->Pipes, 30 $this->Handle = proc_open($this->Command, $DescriptorSpec, $this->Pipes, 31 31 $this->WorkingDir, $this->Environment); 32 32 stream_set_blocking($this->Pipes[0], FALSE); … … 35 35 } 36 36 } 37 38 function Stop() 37 38 function Stop(): void 39 39 { 40 if ($this->IsRunning())40 if ($this->IsRunning()) 41 41 { 42 42 proc_close($this->Handle); … … 44 44 } 45 45 } 46 47 function IsRunning() 46 47 function IsRunning(): bool 48 48 { 49 return (is_resource($this->Handle));49 return is_resource($this->Handle); 50 50 } 51 51 }
Note:
See TracChangeset
for help on using the changeset viewer.