You are here

private function Parser::getCurrentLineIndentation in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Symfony/Component/Yaml/Parser.php \Symfony\Component\Yaml\Parser::getCurrentLineIndentation()
  2. 7.2 vendor/Symfony/Component/Yaml/Parser.php \Symfony\Component\Yaml\Parser::getCurrentLineIndentation()

Returns the current line indentation.

Return value

integer The current line indentation

4 calls to Parser::getCurrentLineIndentation()
Parser::getNextEmbedBlock in vendor/Symfony/Component/Yaml/Parser.php
Returns the next embed block of YAML.
Parser::isNextLineIndented in vendor/Symfony/Component/Yaml/Parser.php
Returns true if the next line is indented.
Parser::isNextLineUnIndentedCollection in vendor/Symfony/Component/Yaml/Parser.php
Returns true if the next line starts unindented collection
Parser::parse in vendor/Symfony/Component/Yaml/Parser.php
Parses a YAML string to a PHP value.

File

vendor/Symfony/Component/Yaml/Parser.php, line 273

Class

Parser
Parser parses YAML strings to convert them to PHP arrays.

Namespace

Symfony\Component\Yaml

Code

private function getCurrentLineIndentation() {
  return strlen($this->currentLine) - strlen(ltrim($this->currentLine, ' '));
}