private function checkOptions($options)
    {
        foreach ($this->required as $req) {
            if (!array_key_exists($req, $options)) {
                throw new \Exception('"' . $req . '" option has not been defined');
            }
        }
    }