Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400] [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

SCSSPHP

Copyright: 2012-2020 Leaf Corcoran
License: http://opensource.org/licenses/MIT MIT
File Size: 381 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

SourceMapGenerator:: (9 methods):
  __construct()
  addMapping()
  saveMap()
  generateJson()
  getSourcesContent()
  generateMappings()
  findFileIndex()
  normalizeFilename()
  fixWindowsPath()


Class: SourceMapGenerator  - X-Ref

Source Map Generator

{@internal Derivative of oyejorge/less.php's lib/SourceMap/Generator.php, relicensed with permission. }}

__construct(array $options = [])   X-Ref


addMapping($generatedLine, $generatedColumn, $originalLine, $originalColumn, $sourceFile)   X-Ref
Adds a mapping

return: void
param: int    $generatedLine   The line number in generated file
param: int    $generatedColumn The column number in generated file
param: int    $originalLine    The line number in original file
param: int    $originalColumn  The column number in original file
param: string $sourceFile      The original source file

saveMap($content)   X-Ref
Saves the source map to a file

return: string
param: string $content The content to write

generateJson($prefix = '')   X-Ref
Generates the JSON source map

return: string
param: string $prefix A prefix added in the output file, which needs to shift mappings

getSourcesContent()   X-Ref
Returns the sources contents

return: string[]|null

generateMappings($prefix = '')   X-Ref
Generates the mappings string

return: string
param: string $prefix A prefix added in the output file, which needs to shift mappings

findFileIndex($filename)   X-Ref
Finds the index for the filename

return: int|false
param: string $filename

normalizeFilename($filename)   X-Ref
Normalize filename

return: string
param: string $filename

fixWindowsPath($path, $addEndSlash = false)   X-Ref
Fix windows paths

return: string
param: string $path
param: bool   $addEndSlash