InfyOm\Generator\Generators\API\APIRoutesGenerator::__construct PHP Méthode

__construct() public méthode

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);
    }