vendor/ramsey/uuid/src/Console/Command/GenerateCommand.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* This file is part of the Rhumsaa\Uuid library
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @copyright Copyright (c) 2013-2014 Ben Ramsey <http://benramsey.com>
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Rhumsaa\Uuid\Console\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Rhumsaa\Uuid\Console\Exception;
use Rhumsaa\Uuid\Uuid;
/**
* Provides the console command to generate UUIDs
*/
class GenerateCommand extends Command
{
/**
* {@inheritdoc}
*/
protected function configure()
{
parent::configure();
$this->setName('generate')
->setDescription('Generate a UUID')
->addArgument(
'version',
InputArgument::OPTIONAL,
'The UUID version to generate. Supported are version "1", "3", '
.'"4" and "5".',
1
)
->addArgument(
'namespace',
InputArgument::OPTIONAL,
'For version 3 or 5 UUIDs, the namespace to create a UUID for. '
.'May be either a UUID in string representation or an identifier '
.'for internally pre-defined namespace UUIDs (currently known '
.'are "ns:DNS", "ns:URL", "ns:OID", and "ns:X500").'
)
->addArgument(
'name',
InputArgument::OPTIONAL,
'For version 3 or 5 UUIDs, the name to create a UUID for. '
.'The name is a string of arbitrary length.'
)
->addOption(
'count',
'c',
InputOption::VALUE_REQUIRED,
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。