lithium\console\command\Create::_namespace()
Get the namespace.
Parameters
-
string
$request
-
array
$options
Returns
stringSource
protected function _namespace($request, $options = array()) {
$name = $request->command;
$defaults = array(
'prefix' => $this->_library['prefix'],
'prepend' => null,
'spaces' => array(
'model' => 'models', 'view' => 'views', 'controller' => 'controllers',
'command' => 'extensions.command', 'adapter' => 'extensions.adapter',
'helper' => 'extensions.helper'
)
);
$options += $defaults;
if (isset($options['spaces'][$name])) {
$name = $options['spaces'][$name];
}
return str_replace('.', '\\', $options['prefix'] . $options['prepend'] . $name);
}