/** * @return ChannelFactoryInterface */ public static function getChannelFactory() { if (self::$channelFactory === null) { self::$channelFactory = SerializedChannelFactory::getInstance(); } return self::$channelFactory; }
/** * @param bool $withAutoloader */ public function __construct($withAutoloader = true) { $this->phpExecutablePath = null; $this->phpArguments = null; $this->preferredIdentity = null; $this->stage1Parts = []; $this->scriptsToRequire = $withAutoloader ? [AutoloaderFinder::findAutoloader()] : []; $this->stage2Parts = []; $this->variableName = 'workerImpl'; $this->constructorArguments = []; $this->stage3Parts = []; $this->channelFactory = SerializedChannelFactory::getInstance(); $this->loopExpression = null; $this->socketContextExpression = null; $this->adminCookie = null; $this->outputPath = null; $this->killSwitchPath = null; $this->precompiledScripts = []; }