You are here

public function RealisticDummyContentLiveEnvironment::implementFileGetContents in Realistic Dummy Content 8.2

Same name and namespace in other branches
  1. 7.2 api/src/includes/RealisticDummyContentLiveEnvironment.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentLiveEnvironment::implementFileGetContents()
  2. 3.x api/src/includes/RealisticDummyContentLiveEnvironment.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentLiveEnvironment::implementFileGetContents()

Internal function used to get the contents of a file.

Wrapper around PHP's file_get_contents() (or a simulation thereof). This function will not return an exception. Please use RealisticDummyContentEnvironment::file_get_contents(), instead.

Parameters

string $filename: A valid filename, for example /drupal/root/sites/all/modules/your_module/ realistic_dummy_content/fields/node/blog/body/03.txt.

Return value

object Undefined in case the filename is invalid; otherwise returns the contents of the file.

Overrides RealisticDummyContentEnvironment::implementFileGetContents

File

api/src/includes/RealisticDummyContentLiveEnvironment.php, line 17

Class

RealisticDummyContentLiveEnvironment
The live environment.

Namespace

Drupal\realistic_dummy_content_api\includes

Code

public function implementFileGetContents($filename) {
  return file_get_contents($filename);
}