/** * @param ProviderInterface $provider */ public function addProvider(ProviderInterface $provider) { $this->providers[$provider->getName()] = $provider; }
/** * 添加一个短信接口供应商 * * @param ProviderInterface $provider * @return $this */ public function registerProvider(ProviderInterface $provider) { $this->providers[$provider->getName()] = $provider; $this->sortProviders(); return $this; }