protected function _getLevelFromConstant( $level )
	{
		switch( $level )
		{
			case MW_Tree_Manager_Abstract::LEVEL_ONE:
				return 0;
			case MW_Tree_Manager_Abstract::LEVEL_LIST:
				return 1;
			case MW_Tree_Manager_Abstract::LEVEL_TREE:
				return 0x7FFFFFFF; // max. possible level
			default:
				throw new MW_Tree_Exception( sprintf( 'Invalid level constant "%1$d"', $level ) );
		}
	}
protected function _getLevelFromConstant( $level )
	{
		switch( $level )
		{
			case MW_Tree_Manager_Abstract::LEVEL_ONE:
				return 0;
			case MW_Tree_Manager_Abstract::LEVEL_LIST:
				return 1;
			case MW_Tree_Manager_Abstract::LEVEL_TREE:
				return 0x7FFFFFFF; // max. possible level
			default:
				throw new MW_Tree_Exception( sprintf( 'Invalid level constant "%1$d"', $level ) );
		}
	}
protected function _getLevelFromConstant ( $ level ) { switch ( $ level ) { case MW_Tree_Manager_Abstract :: LEVEL_ONE : return 0 ; case MW_Tree_Manager_Abstract :: LEVEL_LIST : return 1 ; case MW_Tree_Manager_Abstract :: LEVEL_TREE : return 0x7FFFFFFF ; // max. possible level default : throw new MW_Tree_Exception ( sprintf ( 'Invalid level constant "%1$d"' , $ level ) ) ; } }
Converts the level constant to the depth of the tree.

@param integer $level Level constant from MW_Tree_Manager_Abstract
@throws MW_Tree_Exception if level constant is invalid
Converts the level constant to the depth of the tree .