public function get($type)
    {
        if ($type === self::TYPE_MAILER) {
            $name = $this->configService->getValue('system_mailer');
        } elseif ($type === self::TYPE_DISPATCHER) {
            $name = $this->configService->getValue('system_dispatcher');
        } else {
            throw new \InvalidArgumentException('Provided type does not exist');
        }

        if (empty($name)) {
            return null;
        }

        return $this->connector->getConnection($name);
    }
public function get($type)
    {
        if ($type === self::TYPE_MAILER) {
            $name = $this->configService->getValue('system_mailer');
        } elseif ($type === self::TYPE_DISPATCHER) {
            $name = $this->configService->getValue('system_dispatcher');
        } else {
            throw new \InvalidArgumentException('Provided type does not exist');
        }

        if (empty($name)) {
            return null;
        }

        return $this->connector->getConnection($name);
    }
public function get ( $ type ) { if ( $ type === self :: TYPE_MAILER ) { $ name = $ this -> configService -> getValue ( 'system_mailer' ) ; } elseif ( $ type === self :: TYPE_DISPATCHER ) { $ name = $ this -> configService -> getValue ( 'system_dispatcher' ) ; } else { throw new \ InvalidArgumentException ( 'Provided type does not exist' ) ; } if ( empty ( $ name ) ) { return null ; } return $ this -> connector -> getConnection ( $ name ) ; }
Returns a configured connection from the provided type

@param string $type
@return mixed|null
Returns a configured connection from the provided type