$table =
$this->
getOption('table'
);
$dbGroup =
$this->
getOption('dbgroup'
);
$return =
$this->
getOption('return'
);
$baseClass =
class_basename($class);
if (preg_match('/^(\S+)Model$/i',
$baseClass,
$match) === 1
) { $baseClass =
$match[1
];
} $table =
is_string($table) ?
$table :
plural(strtolower($baseClass));
$dbGroup =
is_string($dbGroup) ?
$dbGroup : 'default';
$return =
is_string($return) ?
$return : 'array';
if (!
in_array($return,
['array', 'object', 'entity'
], true
)) { // @codeCoverageIgnoreStart
$return = CLI::
prompt(lang('CLI.generator.returnType'
),
['array', 'object', 'entity'
], 'required'
);
CLI::
newLine();
// @codeCoverageIgnoreEnd
} if ($return === 'entity'
) {