Barryvdh\LaravelIdeHelper\Console\MetaCommand::fire PHP Method

fire() public method

Execute the console command.
public fire ( ) : void
return void
    public function fire()
    {
        $this->registerClassAutoloadExceptions();
        $bindings = array();
        foreach ($this->getAbstracts() as $abstract) {
            // Validator and seeder cause problems
            if (in_array($abstract, ['validator', 'seeder'])) {
                continue;
            }
            try {
                $concrete = $this->laravel->make($abstract);
                if (is_object($concrete)) {
                    $bindings[$abstract] = get_class($concrete);
                }
            } catch (\Exception $e) {
                if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
                    $this->comment("Cannot make '{$abstract}': " . $e->getMessage());
                }
            }
        }
        $content = $this->view->make('ide-helper::meta', ['bindings' => $bindings, 'methods' => $this->methods])->render();
        $filename = $this->option('filename');
        $written = $this->files->put($filename, $content);
        if ($written !== false) {
            $this->info("A new meta file was written to {$filename}");
        } else {
            $this->error("The meta file could not be created at {$filename}");
        }
    }