Cml\Console\Commands\Migrate\SeedRun::execute PHP Метод

execute() публичный Метод

执行 seeders.
public execute ( array $args, array $options = [] )
$args array 参数
$options array 选项
    public function execute(array $args, array $options = [])
    {
        $this->bootstrap($args, $options);
        $seedSet = isset($options['seed']) ? $options['seed'] : $options['s'];
        $start = microtime(true);
        if (empty($seedSet)) {
            // run all the seed(ers)
            $this->getManager()->seed();
        } else {
            is_array($seedSet) || ($seedSet = [$seedSet]);
            // run seed(ers) specified in a comma-separated list of classes
            foreach ($seedSet as $seed) {
                $this->getManager()->seed(trim($seed));
            }
        }
        $end = microtime(true);
        Output::writeln('');
        Output::writeln(Colour::colour('All Done. Took ' . sprintf('%.4fs', $end - $start), Colour::GREEN));
    }
SeedRun