Ignore:
Timestamp:
Aug 3, 2021, 11:20:41 AM (3 years ago)
Author:
chronos
Message:
  • Modified: Used explicit types where possible for better error reporting.
  • Modified: Updated Common packaged to newer version.
  • Modified: Simplified pages title.
  • Added: Simple keyword based spam filter for meet items.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 nbproject
        2 Config.php
        31.settings
        42.project
        53.buildpath
         4.htaccess
  • trunk/Packages/Common/Process.php

    r56 r63  
    33class Process
    44{
    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
    1111  function __construct()
    1212  {
     
    1717    $this->WorkingDir = null;
    1818  }
    19  
    20   function Start()
     19
     20  function Start(): void
    2121  {
    22     if(!$this->IsRunning())
     22    if (!$this->IsRunning())
    2323    {
    2424      $DescriptorSpec = array(
     
    2828      );
    2929
    30       $this->Handle = proc_open($this->Command, $DescriptorSpec, $this->Pipes, 
     30      $this->Handle = proc_open($this->Command, $DescriptorSpec, $this->Pipes,
    3131        $this->WorkingDir, $this->Environment);
    3232      stream_set_blocking($this->Pipes[0], FALSE);
     
    3535    }
    3636  }
    37  
    38   function Stop()
     37
     38  function Stop(): void
    3939  {
    40     if($this->IsRunning())
     40    if ($this->IsRunning())
    4141    {
    4242      proc_close($this->Handle);
     
    4444    }
    4545  }
    46  
    47   function IsRunning()
     46
     47  function IsRunning(): bool
    4848  {
    49     return(is_resource($this->Handle));
     49    return is_resource($this->Handle);
    5050  }
    5151}
Note: See TracChangeset for help on using the changeset viewer.