getFilename(); } if ($fileName == '') { throw new RuntimeException('FileName does not exist.'); } // cannot use realpath since the file might not exist, but we do need to have the index // in the same DIRECTORY_SEPARATOR that realpath would use: $fileName = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $fileName); static::$fileCodeGenerators[$fileName] = $fileCodeGenerator; } }