Example #1
0
 /**
  * Constructor.
  * 
  * Takes an optional list of drivers to add to the chain.
  * 
  * @param array $drivers
  * @throws \BedRest\Events\Exception
  */
 public function __construct(array $drivers = array())
 {
     foreach ($drivers as $driver) {
         if (!$driver instanceof Driver) {
             if (is_object($driver)) {
                 throw Exception::invalidDriverSupplied(get_class($driver));
             } else {
                 throw Exception::invalidDriverSupplied(gettype($driver));
             }
         }
     }
     $this->drivers = $drivers;
 }