PHPPM\ProcessSlave::getBridge PHP Method

getBridge() protected method

protected getBridge ( ) : PHPPM\Bridges\BridgeInterface
return PHPPM\Bridges\BridgeInterface
    protected function getBridge()
    {
        if (null === $this->bridge && $this->bridgeName) {
            if (true === class_exists($this->bridgeName)) {
                $bridgeClass = $this->bridgeName;
            } else {
                $bridgeClass = sprintf('PHPPM\\Bridges\\%s', ucfirst($this->bridgeName));
            }
            $this->bridge = new $bridgeClass();
        }
        return $this->bridge;
    }