/**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     // Create translator service.
     $this->translator = new TranslatorService($this->getLangFiles());
     $this->translator->setDefaultLocale($this->config->get('app.locale'));
     // Check missing translation.
     $this->missing = $this->flatten($this->translator->getMissing());
     $this->check();
     // Start interactive shell.
     while (true) {
         $action = strtoupper($this->ask('What do you want to do? [T]ranslate, [C]heck, [S]ave, [E]xit.'));
         if ($action === 'T') {
             $this->translate();
         }
         if ($action === 'C') {
             $this->check();
         }
         if ($action === 'S') {
             $this->save();
         }
         if ($action === 'E') {
             exit;
         }
     }
 }
 /**
  * Parses the 2 sections (gets the splitter from config)
  *
  * @param $source
  * @param $offset
  * @return string
  * @throws Exceptions\TooFewSectionsException
  */
 protected function parseSection($source, $offset)
 {
     $sections = preg_split($this->config->get('laravel-markdown-plus::section_splitter'), $source, 2);
     if (count($sections) != 2) {
         throw new TooFewSectionsException();
     }
     return trim($sections[$offset]);
 }
 /**
  * Sets the markdown parser options
  */
 protected function setParserOptions()
 {
     $options = $this->config->get('laravel-markdown-plus::markdown_parser_options');
     foreach ($options as $key => $value) {
         if (property_exists($this->markdownParser, $key)) {
             $this->markdownParser->{$key} = $value;
         }
     }
 }
Esempio n. 4
0
<?php

return array_merge(Illuminate\Support\Facades\Config::get('app-base'), Illuminate\Support\Facades\Config::get('app-custom'));