| 1 | <?php | ||
| 20 | class HorizonServiceBindings implements IteratorAggregate | ||
| 21 | { | ||
| 22 | // Conveniently, Horizon provides a trait that declares each of the services | ||
| 23 | // that it registers with the application container. As long as this trait | ||
| 24 | // exists, we can use it to find the services that need the Sentinel manager | ||
| 25 | // dependency injected. | ||
| 26 | // | ||
| 27 | // This trait adds the public $serviceBindings property to the service | ||
| 28 | // provider. We could access this property from the formal Horizon service | ||
| 29 | // provider, but we'll re-declare it here in case the package's service | ||
| 30 | // provider loads before Horizon's provider. | ||
| 31 | use ServiceBindings; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Get an iterator for the service bindings so we can iterate over an | ||
| 35 | * instance of this class. | ||
| 36 | * | ||
| 37 | * @return ArrayIterator | ||
| 38 | */ | ||
| 39 | public function getIterator() | ||
| 43 | } | ||
| 44 |