Sleimanx2\Plastic\Console\Mapping\Run::handle PHP 메소드

handle() 공개 메소드

Execute the console command.
public handle ( )
    public function handle()
    {
        if (!$this->confirmToProceed()) {
            return;
        }
        $this->prepareDatabase();
        $path = $this->getMappingPath();
        $this->mapper->run($path, ['step' => $this->option('step')]);
        // Once the mapper has run we will grab the note output and send it out to
        // the console screen, since the mapper itself functions without having
        // any instances of the OutputInterface contract passed into the class.
        foreach ($this->mapper->getNotes() as $note) {
            $this->output->writeln($note);
        }
    }