[ Index ]

PHP Cross Reference of phpBB-3.3.11-deutsch

title

Body

[close]

/vendor/s9e/text-formatter/src/Configurator/JavaScript/ -> ConfigOptimizer.php (summary)

(no description)

Copyright: Copyright (c) 2010-2022 The s9e authors
License: http://www.opensource.org/licenses/mit-license.php The MIT License
File Size: 212 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ConfigOptimizer:: (12 methods):
  __construct()
  getVarDeclarations()
  optimize()
  reset()
  canDeduplicate()
  deduplicateConfigValues()
  getVarName()
  isIterable()
  optimizeObjectContent()
  recordObject()
  recordObjectContent()
  shouldPreserve()


Class: ConfigOptimizer  - X-Ref

This class creates local variables to deduplicate complex configValues

__construct(Encoder $encoder)   X-Ref
Constructor

param: Encoder $encoder

getVarDeclarations()   X-Ref
Return the var declarations for all deduplicated config values

return: string JavaScript code

optimize($object)   X-Ref
Optimize given config object

return: array|Dictionary         Modified config object
param: array|Dictionary $object Original config object

reset()   X-Ref
Clear the deduplicated config values stored in this instance

return: void

canDeduplicate($value)   X-Ref
Test whether given value can be deduplicated

return: bool
param: mixed $value

deduplicateConfigValues()   X-Ref
Mark ConfigValue instances that have been used multiple times

return: void

getVarName($js)   X-Ref
Return the name of the variable that will a given value

return: string
param: string $js JavaScript representation of the value

isIterable($value)   X-Ref
Test whether given value is iterable

return: bool
param: mixed $value

optimizeObjectContent($object)   X-Ref
Optimize given object's content

return: array|Dictionary         Modified object
param: array|Dictionary $object Original object

recordObject($object)   X-Ref
Record a given config object as a ConfigValue instance

return: ConfigValue                   Stored ConfigValue instance
param: array|Code|Dictionary $object Original object

recordObjectContent($object)   X-Ref
Record the content of given config object

return: array|Dictionary         Modified object containing ConfigValue instances
param: array|Dictionary $object Original object

shouldPreserve($value)   X-Ref
Test whether given value should be preserved and not deduplicated

return: bool
param: mixed $value



Generated: Sat Nov 4 14:26:03 2023 Cross-referenced by PHPXref 0.7.1