You are here

function RealisticDummyContentFileGroup::GetRadicalExtension in Realistic Dummy Content 7

Returns the extension of the radical filename.

Return value

An extension, can be empty.

File

api/includes/RealisticDummyContentFileGroup.inc, line 173
Define RealisticDummyContentFileGroup autoload class.

Class

RealisticDummyContentFileGroup
Represents files as groups.

Code

function GetRadicalExtension() {
  $filename = $this
    ->GetRadical();
  $extension = pathinfo($filename, PATHINFO_EXTENSION);
  if (!$extension) {
    throw new RealisticDummyContentException('Files require extensions.');
  }
  return $extension;
}