You are here

static function Environment::getFileParts in Realistic Dummy Content 8

2 calls to Environment::getFileParts()
Environment::addFileToArray in api/src/environments/Environment.php
Environment::validCandidateFilename in api/src/environments/Environment.php

File

api/src/environments/Environment.php, line 266
Define autoload class.

Class

Environment
The abstract base environment.

Namespace

Drupal\realistic_dummy_content_api\environments

Code

static function getFileParts($name) {
  $return = array();
  $parts = explode('.', $name);
  if (count($parts) >= 4) {
    $return['attribute_extention'] = array_pop($parts);
    $return['attribute_name'] = array_pop($parts);
  }
  $return['base'] = implode('.', $parts);
  $return['base_extension'] = array_pop($parts);
  return $return;
}