class GenerateCommand extends Command (View source)

Provides the console command to generate UUIDs

Methods

configure()

{@inheritDoc}

execute(InputInterface $input, OutputInterface $output)

{@inheritDoc}

createUuid(int $version, string $namespace = null, string $name = null)

Creates the requested UUID

string
validateNamespace(string $namespace)

Validates the namespace argument

Details

protected configure()

{@inheritDoc}

protected execute(InputInterface $input, OutputInterface $output)

{@inheritDoc}

Parameters

InputInterface $input
OutputInterface $output

protected Uuid createUuid(int $version, string $namespace = null, string $name = null)

Creates the requested UUID

Parameters

int $version
string $namespace
string $name

Return Value

Uuid

protected string validateNamespace(string $namespace)

Validates the namespace argument

Parameters

string $namespace

Return Value

string The namespace, if valid

Exceptions

Exception