public function parse($sourceCode, $contextPathAndFilename = null, array $objectTreeUntilNow = array(), $buildPrototypeHierarchy = true)
{
if (!is_string($sourceCode)) {
throw new Fusion\Exception('Cannot parse TypoScript - $sourceCode must be of type string!', 1180203775);
}
$this->initialize();
$this->objectTree = $objectTreeUntilNow;
$this->contextPathAndFilename = $contextPathAndFilename;
$this->currentSourceCodeLines = explode(chr(10), $sourceCode);
while (($typoScriptLine = $this->getNextTypoScriptLine()) !== false) {
$this->parseTypoScriptLine($typoScriptLine);
}
if ($buildPrototypeHierarchy) {
$this->buildPrototypeHierarchy();
}
return $this->objectTree;
}