@@ -4,28 +4,28 @@ |
||
| 4 | 4 | |
| 5 | 5 | class Process extends Component |
| 6 | 6 | { |
| 7 | - public $class = 'System.Diagnostics.Process'; |
|
| 8 | - public $namespace = 'System'; |
|
| 7 | + public $class = 'System.Diagnostics.Process'; |
|
| 8 | + public $namespace = 'System'; |
|
| 9 | 9 | |
| 10 | - public function __construct (int $pid = null) |
|
| 11 | - { |
|
| 10 | + public function __construct (int $pid = null) |
|
| 11 | + { |
|
| 12 | 12 | $this->selector = \VoidCore::getClass ($this->class, $this->namespace); |
| 13 | 13 | |
| 14 | - if ($pid !== null) |
|
| 14 | + if ($pid !== null) |
|
| 15 | 15 | $this->selector = $pid == getmypid () ? |
| 16 | 16 | \VoidCore::callMethod ($this->selector, 'GetCurrentProcess') : |
| 17 | 17 | \VoidCore::callMethod ($this->selector, 'GetProcessById', $pid); |
| 18 | 18 | |
| 19 | - Components::addComponent ($this->selector, $this); |
|
| 20 | - } |
|
| 19 | + Components::addComponent ($this->selector, $this); |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - public static function getProcessById (int $pid) |
|
| 23 | - { |
|
| 24 | - return new self ($pid); |
|
| 25 | - } |
|
| 22 | + public static function getProcessById (int $pid) |
|
| 23 | + { |
|
| 24 | + return new self ($pid); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - public static function getCurrentProcess () |
|
| 28 | - { |
|
| 29 | - return new self (getmypid ()); |
|
| 30 | - } |
|
| 27 | + public static function getCurrentProcess () |
|
| 28 | + { |
|
| 29 | + return new self (getmypid ()); |
|
| 30 | + } |
|
| 31 | 31 | } |