/** * Constructor that checks if an adapter isset * * @param $spec * @param $options */ public function __construct($spec, $options = null) { if (isset($options['adapter'])) { $this->setAdapter($options['adapter']); unset($options['adapter']); //Else the option is taken into account when constructing parent, duh.. } parent::__construct($spec, $options); }