public function __construct(StoreInterface $store = null, GeneratorFactory $factory = null) { $this->store = $store ?: new ModelStore(); $this->factory = $factory ?: new GeneratorFactory(); }
/** * @param array $models ex: [ Model1::className(), Model2::className() ] * @throws ModelException * @throws ModelNotFoundException * @throws \League\FactoryMuffin\Exceptions\DefinitionAlreadyDefinedException */ public function __construct($models = []) { parent::__construct(new ModelStoreYii()); if (!empty($models)) { $this->loadModelDefinitions($models); } }