Same name in other branches
- 5.0.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getReal()
- 6.0.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getReal()
- 7.x-2.x advagg_js_compress/jshrink.inc \JShrink\Minifier::getReal()
- 8.x-2.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getReal()
- 8.x-4.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getReal()
This function gets the next "real" character. It is essentially a wrapper around the getChar function that skips comments. This has significant performance benefits as the skipping is done using native functions (ie, c code) rather than in script php.
Return value
string Next 'real' character to be processed.
Throws
\RuntimeException
3 calls to Minifier::getReal()
- Minifier::initialize dans advagg_js_minify/
jshrink.inc - Initializes internal variables, normalizes new lines,
- Minifier::loop dans advagg_js_minify/
jshrink.inc - The primary action occurs here. This function loops through the input string, outputting anything that's relevant and discarding anything that is not.
- Minifier::saveRegex dans advagg_js_minify/
jshrink.inc - When a regular expression is detected this function crawls for the end of it and saves the whole regex.
Fichier
-
advagg_js_minify/
jshrink.inc, line 344
Classe
- Minifier
- Minifier
Namespace
JShrinkCode
protected function getReal() {
$startIndex = $this->index;
$char = $this->getChar();
// Check to see if we're potentially in a comment
if ($char !== '/') {
return $char;
}
$this->c = $this->getChar();
if ($this->c === '/') {
return $this->processOneLineComments($startIndex);
}
elseif ($this->c === '*') {
return $this->processMultiLineComments($startIndex);
}
return $char;
}