Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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

SCSSPHP

Copyright: 2012-2019 Leaf Corcoran
License: http://opensource.org/licenses/MIT MIT
File Size: 347 lines (10 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

param: integer $generatedLine   The line number in generated file
param: integer $generatedColumn The column number in generated file
param: integer $originalLine    The line number in original file
param: integer $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

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

generateJson()   X-Ref
Generates the JSON source map

return: string

getSourcesContent()   X-Ref
Returns the sources contents

return: array|null

generateMappings()   X-Ref
Generates the mappings string

return: string

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

param: string $filename
return: integer|false

normalizeFilename($filename)   X-Ref
Normalize filename

param: string $filename
return: string

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

param: string  $path
param: boolean $addEndSlash
return: string