InfyOm\Generator\Generators\API\APIRoutesGenerator::__construct PHP Method

__construct() public method

public __construct ( CommandData $commandData )
$commandData InfyOm\Generator\Common\CommandData
    public function __construct(CommandData $commandData)
    {
        $this->commandData = $commandData;
        $this->path = $commandData->config->pathApiRoutes;
        $this->routeContents = file_get_contents($this->path);
        if (!empty($this->commandData->config->prefixes['route'])) {
            $routesTemplate = TemplateUtil::getTemplate('api.routes.prefix_routes', 'laravel-generator');
        } else {
            $routesTemplate = TemplateUtil::getTemplate('api.routes.routes', 'laravel-generator');
        }
        $this->routesTemplate = TemplateUtil::fillTemplate($this->commandData->dynamicVars, $routesTemplate);
    }