File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 66use Doctrine \ORM \Mapping \MappingException ;
77use Doctrine \Persistence \Mapping \ClassMetadata ;
88use Doctrine \Persistence \Mapping \Driver \MappingDriver ;
9+ use Doctrine \ORM \Mapping \NamingStrategy ;
910use InvalidArgumentException ;
1011use LaravelDoctrine \Fluent \Builders \Builder ;
1112use LaravelDoctrine \Fluent \Mappers \MapperSet ;
@@ -27,11 +28,14 @@ class FluentDriver implements MappingDriver
2728 * documents and operates in the specified operating mode.
2829 *
2930 * @param string[] $mappings
31+ * @param null|NamingStrategy $namingStrategy
3032 */
31- public function __construct (array $ mappings = [])
32- {
33- $ this ->fluentFactory = function (ClassMetadata $ metadata ) {
34- return new Builder (new ClassMetadataBuilder ($ metadata ));
33+ public function __construct (
34+ array $ mappings = [],
35+ NamingStrategy $ namingStrategy = null
36+ ) {
37+ $ this ->fluentFactory = function (ClassMetadata $ metadata ) use ($ namingStrategy ) {
38+ return new Builder (new ClassMetadataBuilder ($ metadata ), $ namingStrategy );
3539 };
3640
3741 $ this ->mappers = new MapperSet ();
You can’t perform that action at this time.
0 commit comments