lithium\console\command\Create::_params()
Parse a template to find available variables specified in {:name}
format. Each variable
corresponds to a method in the sub command. For example, a {:namespace}
variable will
call the namespace method in the model command when li3 create model Post
is called.
Returns
arraySource
protected function _params() {
$contents = $this->_template();
if (empty($contents)) {
return [];
}
preg_match_all('/(?:\{:(?P<params>[^}]+)\})/', $contents, $keys);
if (!empty($keys['params'])) {
return array_values(array_unique($keys['params']));
}
return [];
}