lithium\console\command\Create::_namespace()

protected method

Get the namespace.

Parameters

  • string $request
  • array $options

Returns

string

Source

	protected function _namespace($request, $options  = []) {
		$name = $request->command;
		$defaults = [
			'prefix' => $this->_library['prefix'],
			'prepend' => null,
			'spaces' => [
				'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);
	}