public function hasProvider($provider) { foreach ($this->providers as $p) { if ($p->provider == $provider) { return true; } } return false; }