public function __construct(VersionReader $reader, $className, $options = array()) { $this->reader = $reader; $this->className = $className; $requiredOptions = $reader->getRequiredClassOptions($className); foreach ($requiredOptions as $option => $classes) { if (!isset($options[$option])) { throw new \LogicException('Migration from "' . $classes['from'] . '" to "' . $classes['to'] . '" may require "' . $option . '" option which was not set.'); } } $this->options = $options; }