// Gets the appropriate parent class to extend.
if ($bare ||
$rest) { if ($bare) { $useStatement = Controller::
class;
$extends = 'Controller';
} elseif ($rest) { $rest =
is_string($rest) ?
$rest : 'controller';
if (!
in_array($rest,
['controller', 'presenter'
], true
)) { // @codeCoverageIgnoreStart
$rest = CLI::
prompt(lang('CLI.generator.parentClass'
),
['controller', 'presenter'
], 'required'
);
CLI::
newLine();
// @codeCoverageIgnoreEnd
} if ($rest === 'controller'
) { $useStatement = ResourceController::
class;
$extends = 'ResourceController';
} elseif ($rest === 'presenter'
) { $useStatement = ResourcePresenter::
class;
$extends = 'ResourcePresenter';
} } }