private function Parser::isCurrentLineComment in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/Yaml/Parser.php \Symfony\Component\Yaml\Parser::isCurrentLineComment()
Returns true if the current line is a comment line.
Return value
bool Returns true if the current line is a comment line, false otherwise
2 calls to Parser::isCurrentLineComment()
- Parser::getNextEmbedBlock in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ Yaml/ Parser.php - Returns the next embed block of YAML.
- Parser::isCurrentLineEmpty in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ Yaml/ Parser.php - Returns true if the current line is blank or if it is a comment line.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ Yaml/ Parser.php, line 610
Class
- Parser
- Parser parses YAML strings to convert them to PHP arrays.
Namespace
Symfony\Component\YamlCode
private function isCurrentLineComment() {
//checking explicitly the first char of the trim is faster than loops or strpos
$ltrimmedLine = ltrim($this->currentLine, ' ');
return $ltrimmedLine[0] === '#';
}