Skip to content

Commit 805d416

Browse files
committed
Add access option to model and all-models cmd
1 parent 660a476 commit 805d416

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/Ubiquity/devtools/cmd/Command.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,12 @@ public static function model() {
169169
return new Command("model", "tableName", "Generates a new model.", [
170170
"create-model"
171171
], [
172-
'd' => Parameter::create('database', 'The database connection to use', [], 'default')
172+
'd' => Parameter::create('database', 'The database connection to use', [], 'default'),
173+
'a' => Parameter::create('access', 'The default access to the class members', [], 'private')
173174
], [
174175
'Ubiquity model User',
175-
'Ubiquity model Author -d=projects'
176+
'Ubiquity model Author -d=projects',
177+
'Ubiquity model Author -d=projects -a=protected'
176178
], 'models');
177179
}
178180

@@ -211,10 +213,12 @@ public static function allModels() {
211213
return new Command("all-models", "", "Generates all models from database.", [
212214
"create-all-models"
213215
], [
214-
'd' => Parameter::create('database', 'The database connection to use', [], 'default')
216+
'd' => Parameter::create('database', 'The database connection to use', [], 'default'),
217+
'a' => Parameter::create('access', 'The default access to the class members', [], 'private')
215218
], [
216219
'Ubiquity all-models',
217-
'Ubiquity all-models -d=projects'
220+
'Ubiquity all-models -d=projects',
221+
'Ubiquity all-models -d=projects -a=protected'
218222
], 'models');
219223
}
220224

0 commit comments

Comments
 (0)