Manager/AbstractTextingManager.php
public function send($recipient, $message, $providerName = null)
    {
        if (!$providerName) {
            $provider = $this->defaultProvider;
        }
        elseif (!isset($this->providers[$providerName])) {
            throw new \InvalidArgumentException(sprintf('The provider named "%s" does not exist. Registered providers are : "%s"', $providerName, implode('", "', array_keys($this->providers))));
        }
        else {
            $provider = $this->providers[$providerName];
        }

        $response = $provider->getResponse($recipient, $message);

        if (!$provider->isResponseValid($response)) {
            throw new SendingException(sprintf('Invalid response : %s', json_encode($response)));
        }
    }
public function send($recipient, $message, $providerName = null)
    {
        if (!$providerName) {
            $provider = $this->defaultProvider;
        }
        elseif (!isset($this->providers[$providerName])) {
            throw new \InvalidArgumentException(sprintf('The provider named "%s" does not exist. Registered providers are : "%s"', $providerName, implode('", "', array_keys($this->providers))));
        }
        else {
            $provider = $this->providers[$providerName];
        }

        $response = $provider->getResponse($recipient, $message);

        if (!$provider->isResponseValid($response)) {
            throw new SendingException(sprintf('Invalid response : %s', json_encode($response)));
        }
    }
@param string $recipient The number to send to
@param string $message The message to send to
@param string|null $providerName The provider name to use. If none is provided, it should use the first one

@throws \InvalidArgumentException if the provider does not exist
@throws \Takeatea\Component\Texting\Exception\SendingException if an error occured while sending the SMS

@see TextingProviderInterface::isValid()