Potsky\LaravelLocalizationHelpers\Factory\MessageBagInterface::writeLine PHP Метод

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

Add a simple message
public writeLine ( string $s ) : void
$s string the message to display
Результат void
    public function writeLine($s);

Usage Example

 /**
  * @param array $lemmas an array of lemma
  *                      eg: [ 'message.lemma.child' => string(83)
  *                      "/Users/potsky/WTF/laravel-localization-helpers/tests/mock/trans.php" , ... ]
  *
  * @return array a flat array of lemma
  *               eg: array(1) {
  *                        'message' =>
  *                            array(2) {
  *                            'lemma.child' => string(83)
  *                            "/Users/potsky/Work/Private/GitHub/laravel-localization-helpers/tests/mock/trans.php"
  *                        ...
  */
 public function convertLemmaToFlatArray($lemmas)
 {
     $lemmas_structured = array();
     foreach ($lemmas as $key => $value) {
         if (strpos($key, '.') === false) {
             $this->messageBag->writeLine('    <error>' . $key . '</error> in file <comment>' . $this->getShortPath($value) . '</comment> <error>will not be included because it has no family</error>');
         } else {
             Tools::arraySetDotFirstLevel($lemmas_structured, $key, $value);
         }
     }
     return $lemmas_structured;
 }