private function recursiveToc(Toc &$toc, $src, array $headers){
		foreach( $headers as $id => $header ){
			$child = $toc->addChild($header['content'], $src.'#'.$id);
			if( $header['children'] ){
				$this->recursiveToc($child, $src, $header['children']);
			}
		}
	}
private function recursiveToc(Toc &$toc, $src, array $headers){
		foreach( $headers as $id => $header ){
			$child = $toc->addChild($header['content'], $src.'#'.$id);
			if( $header['children'] ){
				$this->recursiveToc($child, $src, $header['children']);
			}
		}
	}
private function recursiveToc ( Toc & $ toc , $ src , array $ headers ) { foreach ( $ headers as $ id => $ header ) { $ child = $ toc -> addChild ( $ header [ 'content' ] , $ src . '#' . $ id ) ; if ( $ header [ 'children' ] ) { $ this -> recursiveToc ( $ child , $ src , $ header [ 'children' ] ) ; } } }
Recursively add toc

@param Toc $toc
@param string $src
@param array $headers
Recursively add toc