Lines Matching refs:indent

90   var $indent;  variable in Spyc
182 * @param int $indent Pass in false to use the default, which is 2
185 function YAMLDump($array,$indent = false,$wordwrap = false) { argument
187 return $spyc->dump($array,$indent,$wordwrap);
208 * @param int $indent Pass in false to use the default, which is 2
211 function dump($array,$indent = false,$wordwrap = false) { argument
216 if ($indent === false or !is_numeric($indent)) {
219 $this->_dumpIndent = $indent;
253 function _yamlize($key,$value,$indent, $previous_key = -1, $first_key = 0) { argument
256 return $this->_dumpNode($key, array(), $indent, $previous_key, $first_key);
259 $string = $this->_dumpNode($key, NULL, $indent, $previous_key, $first_key);
261 $indent += $this->_dumpIndent;
263 $string .= $this->_yamlizeArray($value,$indent);
266 $string = $this->_dumpNode($key, $value, $indent, $previous_key, $first_key);
278 function _yamlizeArray($array,$indent) { argument
284 $string .= $this->_yamlize($key, $value, $indent, $previous_key, $first_key);
301 function _dumpNode($key, $value, $indent, $previous_key = -1, $first_key = 0) { argument
306 $value = $this->_doLiteralBlock($value,$indent);
308 $value = $this->_doFolding($value,$indent);
316 $spaces = str_repeat(' ',$indent);
337 function _doLiteralBlock($value,$indent) { argument
346 $indent += $this->_dumpIndent;
347 $spaces = str_repeat(' ',$indent);
360 function _doFolding($value,$indent) { argument
364 $indent += $this->_dumpIndent;
365 $indent = str_repeat(' ',$indent);
366 $wrapped = wordwrap($value,$this->_dumpWordWrap,"\n$indent");
367 $value = ">\n".$indent.$wrapped;
403 $this->indent = strlen($line) - strlen(ltrim($line));
404 $tempPath = $this->getParentPathByIndent($this->indent);
405 $line = $this->stripIndent($line, $this->indent);
416 while (++$i < $cnt && $this->literalBlockContinues($Source[$i], $this->indent)) {
439 $this->addArray($lineArray, $this->indent);
441 foreach ($this->delayedPath as $indent => $delayedPath)
442 $this->path[$indent] = $delayedPath;
722 function addArrayInline ($array, $indent) { argument
727 $this->addArray(array($k => $_), $indent);
848 function stripIndent ($line, $indent = -1) { argument
849 if ($indent == -1) $indent = strlen($line) - strlen(ltrim($line));
850 return substr ($line, $indent);
853 function getParentPathByIndent ($indent) { argument
854 if ($indent == 0) return array();
858 if ($indent <= $lastIndentInParentPath) array_pop ($linePath);
859 } while ($indent <= $lastIndentInParentPath);
864 function clearBiggerPathValues ($indent) { argument
867 if ($indent == 0) $this->path = array();
871 if ($k > $indent) unset ($this->path[$k]);
926 $this->delayedPath = array(strpos ($line, $key) + $this->indent => $key);