protected function configure() { $this->setOutputPath($this->rootDir . "/gen-src"); $phpModule = new PhpModule(); $jsonModule = new JsonModule(); $constantsModule = new ConstantsModule(); $datetimeFormattingSerializer = new DateTimeFormattingSerializer(\DateTime::ISO8601); $datetimeFormattingSerializer->addGroup("json:"); $datetimePassthruSerializer = new DatetimePassthruPropertySerializer(); $mongoIdPropertySerializer = new MongoIdPropertySerializer(); $mongoIdPropertySerializer->addStringifyGroup("json:"); $phpModule->addPropertySerializer($datetimeFormattingSerializer)->addPropertySerializer($datetimePassthruSerializer)->addPropertySerializer($mongoIdPropertySerializer); $this->match("CC15\\Entity\\**")->match("CC15\\MQ\\VO\\**")->notMatch("**Enum")->addModule($phpModule)->addModule($jsonModule)->addModule($constantsModule); }
protected function configure() { $this->match("Skrz\\Meta\\Fixtures\\PHP\\ClassWith*")->addModule($phpModule = new PhpModule()); $phpModule->addPropertySerializer(new DateTimeFormattingSerializer("Y-m-d H:i:s")); }