src/AppBundle/Command/InitWebsiteCommand.php
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace AppBundle\Command;
use AppBundle\Common\BlockToolkit;
use Biz\User\CurrentUser;
use Topxia\Service\Common\ServiceKernel;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use AppBundle\Common\SystemInitializer;
use Biz\Crontab\SystemCrontabInitializer;
class InitWebsiteCommand extends BaseCommand
{
private $db_host = '127.0.0.1';
private $db_port = '3306';
private $db_user = 'root';
private $db_password = 'root';
private $db_name = 'edusoho';
protected function configure()
{
$this->setName('util:init-website')
->addArgument('accessKey', InputArgument::REQUIRED, 'accessKey')
->addArgument('secretKey', InputArgument::REQUIRED, 'secretKey')
->addArgument('username', InputArgument::REQUIRED, 'username')
->addArgument('email', InputArgument::REQUIRED, 'email')
->addArgument('password', InputArgument::REQUIRED, 'password')
->addArgument('siteName', InputArgument::REQUIRED, 'siteName')
->setDescription('用于初始化edusoho');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->logger('开始建校', $output);
$result = $this->initDb();
if (true === $result) {
$this->logger('数据库创建成功', $output);
} else {
$this->logger($result, $output);
return;
}
$accessKey = $input->getArgument('accessKey');
$secretKey = $input->getArgument('secretKey');
$siteName = $input->getArgument('siteName');
$this->initServiceKernel();
$initializer = new SystemInitializer($output);
if (!$this->hasUsedFiles()) {
$initializer->init();
$this->initTopBanner();
$initializer->initRegisterSetting($user);
$setting = array(
'auth' => array('register_mode' => 'email'),
'storage' => array('upload_mode' => 'cloud',
'cloud_access_key' => $accessKey,
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。