<?php

namespace Dipper\Console\Commands;

use Exception;
use Dipper\Console\Generators\RequestGenerator;
use Symfony\Component\Console\Input\InputArgument;

/**
 * Class RequestMakeCommand.
 *
 * @author HollyTeng <n.haoyuan@gmail.com>
 */
class RequestMakeCommand extends GeneratorCommand
{
    /**
     * The console command name.
     *
     * @var string
     */
    protected $name = 'make:request';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Create a Request in a specific domain.';

    /**
     * The type of class being generated.
     * @var string
     */
    protected $type = 'Request';

    /**
     * Get the stub file for the generator.
     *
     * @return string
     */
    public function getStub()
    {
        return __DIR__ . '/stubs/request.stub';
    }

    /**
     * Get the default namespace for the class.
     *
     * @param  string  $rootNamespace
     * @return string
     */
    protected function getDefaultNamespace($rootNamespace)
    {
        return $rootNamespace.'\\Http\\'.str_plural($this->type);
    }
}
