\App\ConsoleModule\CommandsApiKeyEditCommand

CLI command for editing API keys

Summary

Methods
Properties
Constants
__construct()
No public properties found
No constants found
askDescription()
askExpiration()
askId()
configure()
execute()
$repository
$entityManager
$defaultName
N/A
No private methods found
No private properties found
N/A

Properties

$repository

$repository : \App\Models\Database\Repositories\ApiKeyRepository

Type

normal — API key database repository

$entityManager

$entityManager : \App\Models\Database\EntityManager

Type

normal — Entity manager

$defaultName

$defaultName : string

Type

normal — Command name

Methods

__construct()

__construct(\App\Models\Database\EntityManager  $entityManager, string|null  $name = null) : mixed

Constructor

Parameters

\App\Models\Database\EntityManager $entityManager

Entity manager

string|null $name

Command name

Returns

mixed

askDescription()

askDescription(\Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : string

Asks for the API key description

Parameters

\Symfony\Component\Console\Input\InputInterface $input

Command input

\Symfony\Component\Console\Output\OutputInterface $output

Command output

Returns

string —

Username

askExpiration()

askExpiration(\Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : \DateTime

Asks for the API key expiration date

Parameters

\Symfony\Component\Console\Input\InputInterface $input

Command input

\Symfony\Component\Console\Output\OutputInterface $output

Command output

Returns

\DateTime —

API key expiration date

askId()

askId(\Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : \App\Models\Database\Entities\ApiKey

Asks for the API key ID

Parameters

\Symfony\Component\Console\Input\InputInterface $input

Command input

\Symfony\Component\Console\Output\OutputInterface $output

Command output

Returns

\App\Models\Database\Entities\ApiKey —

API key

configure()

configure() : void

Configures the user add command

execute()

execute(\Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : int

Executes the API key edit command

Parameters

\Symfony\Component\Console\Input\InputInterface $input

Command input

\Symfony\Component\Console\Output\OutputInterface $output

Command output

Returns

int —

Exit code