SharedWorker.php
public static function startWithExpression($socketAddress, WorkerBootstrapProfile $bootstrapProfile, $implementationExpression, Exception\ConnectException $e = null)
    {
        if (!IdentificationHelper::isLocalAddress($socketAddress)) {
            if ($e) {
                throw $e;
            } else {
                throw new Exception\LogicException("Can't start the worker, because its socket address is not local");
            }
        }

        $bootstrapProfile->getOrFindPhpExecutablePathAndArguments($php, $phpArgs);
        $bootstrapProfile->compileScriptWithExpression($implementationExpression, $socketAddress, $scriptPath, $deleteScript);

        try {
            $line = array_merge([$php], $phpArgs, [$scriptPath]);
            self::startDaemon($line, $bootstrapProfile->getOutputPath());
        } catch (\Exception $e) {
            if ($deleteScript) {
                unlink($scriptPath);
            }
            throw $e;
        }
    }
public static function startWithExpression($socketAddress, WorkerBootstrapProfile $bootstrapProfile, $implementationExpression, Exception\ConnectException $e = null)
    {
        if (!IdentificationHelper::isLocalAddress($socketAddress)) {
            if ($e) {
                throw $e;
            } else {
                throw new Exception\LogicException("Can't start the worker, because its socket address is not local");
            }
        }

        $bootstrapProfile->getOrFindPhpExecutablePathAndArguments($php, $phpArgs);
        $bootstrapProfile->compileScriptWithExpression($implementationExpression, $socketAddress, $scriptPath, $deleteScript);

        try {
            $line = array_merge([$php], $phpArgs, [$scriptPath]);
            self::startDaemon($line, $bootstrapProfile->getOutputPath());
        } catch (\Exception $e) {
            if ($deleteScript) {
                unlink($scriptPath);
            }
            throw $e;
        }
    }
public static function startWithExpression ( $ socketAddress , WorkerBootstrapProfile $ bootstrapProfile , $ implementationExpression , Exception \ ConnectException $ e = null ) { if ( ! IdentificationHelper :: isLocalAddress ( $ socketAddress ) ) { if ( $ e ) { throw $ e ; } else { throw new Exception \ LogicException ( "Can't start the worker, because its socket address is not local" ) ; } } $ bootstrapProfile -> getOrFindPhpExecutablePathAndArguments ( $ php , $ phpArgs ) ; $ bootstrapProfile -> compileScriptWithExpression ( $ implementationExpression , $ socketAddress , $ scriptPath , $ deleteScript ) ; try { $ line = array_merge ( [ $ php ] , $ phpArgs , [ $ scriptPath ] ) ; self :: startDaemon ( $ line , $ bootstrapProfile -> getOutputPath ( ) ) ; } catch ( \ Exception $ e ) { if ( $ deleteScript ) { unlink ( $ scriptPath ) ; } throw $ e ; } }
@param string                          $socketAddress
@param WorkerBootstrapProfile          $bootstrapProfile
@param string                          $implementationExpression
@param Exception\ConnectException|null $e

@throws Exception\ConnectException
@throws Exception\LogicException
@param string $socketAddress @param WorkerBootstrapProfile $bootstrapProfile @param string $implementationExpression @param Exception \ ConnectException|null $e