private function countDepth( &$nodes, $depth = 0 )
	{
		if ( $depth > $this->maxDepth ) $this->maxDepth = $depth;

		foreach ( $nodes as $nodeKey => &$node )
		{
			$node['depth'] = $depth;

			if ( ! isset( $node['children'] ) || count( $node['children'] ) === 0 ) continue;
			$this->countDepth( $node['children'], $depth + 1 );
		}
	}