You are here

protected function Message::getMessageFromFile in Drupal 8

Same name and namespace in other branches
  1. 9 composer/Plugin/ProjectMessage/Message.php \Drupal\Composer\Plugin\ProjectMessage\Message::getMessageFromFile()

Reads the message file as an array.

Parameters

string $file: The file to read. Relative paths are relative to the project directory.

Return value

string[]

1 call to Message::getMessageFromFile()
Message::getText in composer/Plugin/ProjectMessage/Message.php

File

composer/Plugin/ProjectMessage/Message.php, line 110

Class

Message
Determine configuration.

Namespace

Drupal\Composer\Plugin\ProjectMessage

Code

protected function getMessageFromFile($file) {
  return file_exists($file) ? file($file, FILE_IGNORE_NEW_LINES) : [];
}