添加一个短信接口供应商

@param ProviderInterface $provider
@return $this
555610
public function registerProvider(ProviderInterface $provider)
    {
        $this->providers[$provider->getName()] = $provider;
        $this->sortProviders();

        return $this;
    }
150486
public function addCallable($class, callable $provider, $type='default')
    {
        if (!isset($this->_callables[$type])) {
            $this->_callables[$type] = [];
        }
        $this->_callables[$type][$class] = $provider;
        return $this;
    }
639175
protected function fromProvider($provider)
    {
        $provider = IOC::resolve($provider);
        $module = $provider->create();
        $this->add($provider->getName(), $module);
        return $module;
    }
1291722
public function setProvider($provider=NULL)
    {
        // Prevent the provider from being NULL
        if ($provider == NULL)
            throw new CException(Yii::t('Hybridauth.main', "You haven't supplied a provider"));

        // Set the property
        $this->_provider = $provider;

        return $this->_provider;
    }
1303775
public function addDeferred($provider, array $dependencies)
    {
        foreach($dependencies as $name)
        {
            @list($type, $dependency) = explode('.', $name, 2);

            if(!$dependency)
            {
                $dependency = $type;

                $type = 'service';
            }
            else
            {
                if(!in_array($type, array('service', 'callable', 'factory')))
                {
                    $type = 'service';

                    $dependency = $name;
                }
            }

            $this->providersDeferred[$type.'.'.$dependency] = $provider;
        }

        return $this;
    }
113075
public function add(Provider $provider)
    {
        $provider->setApplication($this->app);
        $providerName = get_class($provider);
        if (!isset($this->providers[$providerName])) {
            $this->providers[$providerName] = $provider;
        }
    }
1002833
public function registerProvider($provider)
    {
        if (($provider = $this->getProvider($provider))) {
        } elseif (is_string($provider)) {
            $provider = $this->resolveProvider($provider);
        }

        if ($this->registeredProvider($provider)) {
            return $provider;
        }

        if (method_exists($provider, 'register')) {
            $provider->register();
        }

        $this->markAsRegistered($provider);

        // If the application has already booted, we will call this boot method on
        // the provider class so it has an opportunity to do its boot logic and
        // will be ready for any usage by this developer's application logic.
        if ($this->booted) {
            $this->bootProvider($provider);
        }
        return $provider;
    }
669311
public function addProvider($provider) {
        $this->validateProvider($provider);

        if (is_object($provider)) {
            $class = get_class($provider);
            $instance = $provider;
        } else {
            $class = $provider;
            $instance = null;
        }

        if ( ! array_has($this->providers, $class)) {
            $this->providers[$class] = [
                'instance' => $instance,
                'tags' => [],
            ];
        }
    }
147085
public function cache($provider, array $params = array())
    {
        $this->cache = array_merge(array(config::PROVIDER => $provider), array(Config::PARAMS => $params));

        return $this;
    }
913057
protected function addProvider($provider)
    {
        $className = $this->resolveProviderClass($provider);

        $this->providers[$provider] = $this->buildProvider($className);
    }
561719
public function providers(array $providers = [])
    {
        foreach ($providers as $provider) {
            $this->app->register(new $provider($this->app));
        }

        return $this;
    }
992341
public function addRoleProvider(RoleProvider $provider)
    {
        $this->loaded && $this->loaded->__invoke();

        $this->roleProviders[] = $provider;

        return $this;
    }
1197977
public function provideHelper($name, $provider)
    {
        if (is_array($provider)) {
            $callback = array_pop($provider);
            $provider = array_map([$this, 'helperName'], $provider);
            $provider[] = $callback;
        }

        $this->formatter->getDependencies()->provider(
            $this->helperName($name),
            $provider
        );

        return $this;
    }
326130
public function register($provider): KernelInterface
    {
        $provider = $this->resolveProvider($provider);

        // don't process the service if it's already registered
        if (! $this->isProviderRegistered($provider)) {
            $this->registerProvider($provider);

            // If the application has already booted, we will call this boot method on
            // the provider class so it has an opportunity to do its boot logic and
            // will be ready for any usage by this developer's application logic.
            if ($this->isBooted) {
                $this->bootProvider($provider);
            }
        }

        return $this;
    }
941272
public function addDriver(DriverInterface $driver)
    {
        $driver->setConnector($this);
        $this->driverList[$driver->getDriverId()] = $driver;

        return $this;
    }
771479
protected function loadProviders($providers)
	{
		foreach ((array) $providers as $provider) {
			$provider = $this->container->get($provider);

			if (!$provider instanceof ServiceProviderInterface) {
				$providerName = get_class($provider);
				throw new \Exception(
					"$providerName does not implement required \\TitaPHP\\Foundation\\ServiceProviderInterface Interface"
				);
			}

			$provider->register($this);
		}
	}
488161
public function register($provider)
    {
        if (! $provider instanceof ServiceProvider) {
            $provider = new $provider($this);
        }

        if (array_key_exists($providerName = get_class($provider), $this->loadedProviders)) {
            return;
        }

        $this->loadedProviders[$providerName] = true;

        if (method_exists($provider, 'register')) {
            $provider->register();
        }

        if (method_exists($provider, 'boot')) {
            return $this->call([$provider, 'boot']);
        }
    }