SharedWorker.php
public static function stopWorker($socketAddress, WorkerBootstrapProfile $bootstrapProfile)
    {
        $adminCookie = $bootstrapProfile->getAdminCookie();
        if ($adminCookie === null) {
            throw new Exception\LogicException('Cannot stop a shared worker without an admin cookie');
        }
        try {
            $channel = self::connect($socketAddress, $bootstrapProfile);
        } catch (Exception\RuntimeException $e) {
            return false;
        }
        AdminEncoding::sendStopMessage($channel, $adminCookie);

        return true;
    }
public static function stopWorker($socketAddress, WorkerBootstrapProfile $bootstrapProfile)
    {
        $adminCookie = $bootstrapProfile->getAdminCookie();
        if ($adminCookie === null) {
            throw new Exception\LogicException('Cannot stop a shared worker without an admin cookie');
        }
        try {
            $channel = self::connect($socketAddress, $bootstrapProfile);
        } catch (Exception\RuntimeException $e) {
            return false;
        }
        AdminEncoding::sendStopMessage($channel, $adminCookie);

        return true;
    }
public static function stopWorker ( $ socketAddress , WorkerBootstrapProfile $ bootstrapProfile ) { $ adminCookie = $ bootstrapProfile -> getAdminCookie ( ) ; if ( $ adminCookie === null ) { throw new Exception \ LogicException ( 'Cannot stop a shared worker without an admin cookie' ) ; } try { $ channel = self :: connect ( $ socketAddress , $ bootstrapProfile ) ; } catch ( Exception \ RuntimeException $ e ) { return false ; } AdminEncoding :: sendStopMessage ( $ channel , $ adminCookie ) ; return true ; }
@param string                 $socketAddress
@param WorkerBootstrapProfile $bootstrapProfile

@throws Exception\LogicException
@throws Exception\RuntimeException

@return bool
@param string $socketAddress @param WorkerBootstrapProfile $bootstrapProfile