1*dad993c5SAndreas Gohr<?php 2*dad993c5SAndreas Gohr 3*dad993c5SAndreas Gohr/** 4*dad993c5SAndreas Gohr * This file is part of the FreeDSx LDAP package. 5*dad993c5SAndreas Gohr * 6*dad993c5SAndreas Gohr * (c) Chad Sikorra <Chad.Sikorra@gmail.com> 7*dad993c5SAndreas Gohr * 8*dad993c5SAndreas Gohr * For the full copyright and license information, please view the LICENSE 9*dad993c5SAndreas Gohr * file that was distributed with this source code. 10*dad993c5SAndreas Gohr */ 11*dad993c5SAndreas Gohr 12*dad993c5SAndreas Gohrnamespace FreeDSx\Ldap\Server; 13*dad993c5SAndreas Gohr 14*dad993c5SAndreas Gohruse FreeDSx\Socket\Socket; 15*dad993c5SAndreas Gohr 16*dad993c5SAndreas Gohrclass ChildProcess 17*dad993c5SAndreas Gohr{ 18*dad993c5SAndreas Gohr /** 19*dad993c5SAndreas Gohr * @var int 20*dad993c5SAndreas Gohr */ 21*dad993c5SAndreas Gohr private $pid; 22*dad993c5SAndreas Gohr 23*dad993c5SAndreas Gohr /** 24*dad993c5SAndreas Gohr * @var Socket 25*dad993c5SAndreas Gohr */ 26*dad993c5SAndreas Gohr private $socket; 27*dad993c5SAndreas Gohr 28*dad993c5SAndreas Gohr public function __construct( 29*dad993c5SAndreas Gohr int $pid, 30*dad993c5SAndreas Gohr Socket $socket 31*dad993c5SAndreas Gohr ) { 32*dad993c5SAndreas Gohr $this->pid = $pid; 33*dad993c5SAndreas Gohr $this->socket = $socket; 34*dad993c5SAndreas Gohr } 35*dad993c5SAndreas Gohr 36*dad993c5SAndreas Gohr public function getPid(): int 37*dad993c5SAndreas Gohr { 38*dad993c5SAndreas Gohr return $this->pid; 39*dad993c5SAndreas Gohr } 40*dad993c5SAndreas Gohr 41*dad993c5SAndreas Gohr public function getSocket(): Socket 42*dad993c5SAndreas Gohr { 43*dad993c5SAndreas Gohr return $this->socket; 44*dad993c5SAndreas Gohr } 45*dad993c5SAndreas Gohr 46*dad993c5SAndreas Gohr public function closeSocket(): void 47*dad993c5SAndreas Gohr { 48*dad993c5SAndreas Gohr $this->socket->close(); 49*dad993c5SAndreas Gohr } 50*dad993c5SAndreas Gohr} 51