XBRL.php
public function getDefinitionRoleDimensionMembers( $roleRefsKey )
	{
		$roles = $this->getAllDefinitionRoles();

		if ( ! isset( $roles[ $roleRefsKey ] ) )
		{
			return array();
		}

		$taxonomy = $this->getTaxonomyForXSD( $roles[ $roleRefsKey ] );
		$role = $taxonomy->getDefinitionRoleRef( $roleRefsKey );

		return isset( $role['members'] )
			? $role['members']
			: array();

		/*
		$roleMembers = array();
		if ( ! isset( $this->definitionRoleRefs[ $roleRefsKey ] ) ) return array();

		$role = $this->definitionRoleRefs[ $roleRefsKey ];

		if ( isset( $role['members'] ) && count( $role['members'] ) )
		{
			$roleMembers = $role['members'];
		}
		else if ( isset( $role['hypercubes'] ) && count( $role['hypercubes'] ) )
		{
			foreach ( $role['hypercubes'] as $hypercubeLabel => $hypercube )
			{
				foreach ( $hypercube['dimensions'] as $dimLabel => $dimension )
				{
					if ( ! isset( $dimension['targetRole'] ) ) continue;
					$taxonomy = $this->getTaxonomyForNamespace( $dimension['member_namespace'] );
					if ( ! $taxonomy )
					{
						$this->log()->dimension_validation( "dimensions", "A taxonomy cannot be found corresponding to a namespace", array(
							'dimension' => "'$dimLabel'",
							'namespace' => $dimension['member_namespace'] ? "'{$dimension['member_namespace']}'" : "Undefined",
						) );
						continue;
					}
					$roleMembers += $taxonomy->getDefinitionRoleDimensionMembers( $dimension['targetRole'] );
				}
			}

			return $roleMembers;
		}
		else if ( strpos( $role['href'], $this->getTaxonomyXSD() ) === false )
		{
			$roleMembers = $this->getTaxonomyForXSD( $role['href'] )->getDefinitionRoleDimensionMembers( $roleRefsKey );
			return $roleMembers;
		}

		foreach ( $roleMembers as $memberKey => $member )
		{
			if ( ! isset( $roleMembers[ $memberKey ]['roles'] ) )
			{
				$roleMembers[ $memberKey ]['roles'] = $roleRefsKey;
			}
			else
			{
				// Add unique roleRefsKey
				if ( in_array( $roleRefsKey, $roleMembers[ $memberKey ]['roles'] ) ) continue;
				$roleMembers[ $memberKey ]['roles'][] = $roleRefsKey;
			}
		}

		return $roleMembers;

		$result = array();

		foreach ( $roleMembers as $memberKey => $member )
		{
			if ( ! isset( $result[ $memberKey ] ) )
			{
				$result[ $memberKey ] = array( 'href' => $member, 'roles' => array( $roleRefsKey ) );
				continue;
			}

			// Add unique roleRefsKey
			if ( in_array( $roleRefsKey, $result[ $memberKey ]['roles'] ) ) continue;
			$result[ $memberKey ]['roles'][] = $roleRefsKey;
		}

		return $result;
		*/
	}
public function getDefinitionRoleDimensionMembers( $roleRefsKey )
	{
		$roles = $this->getAllDefinitionRoles();

		if ( ! isset( $roles[ $roleRefsKey ] ) )
		{
			return array();
		}

		$taxonomy = $this->getTaxonomyForXSD( $roles[ $roleRefsKey ] );
		$role = $taxonomy->getDefinitionRoleRef( $roleRefsKey );

		return isset( $role['members'] )
			? $role['members']
			: array();

		/*
		$roleMembers = array();
		if ( ! isset( $this->definitionRoleRefs[ $roleRefsKey ] ) ) return array();

		$role = $this->definitionRoleRefs[ $roleRefsKey ];

		if ( isset( $role['members'] ) && count( $role['members'] ) )
		{
			$roleMembers = $role['members'];
		}
		else if ( isset( $role['hypercubes'] ) && count( $role['hypercubes'] ) )
		{
			foreach ( $role['hypercubes'] as $hypercubeLabel => $hypercube )
			{
				foreach ( $hypercube['dimensions'] as $dimLabel => $dimension )
				{
					if ( ! isset( $dimension['targetRole'] ) ) continue;
					$taxonomy = $this->getTaxonomyForNamespace( $dimension['member_namespace'] );
					if ( ! $taxonomy )
					{
						$this->log()->dimension_validation( "dimensions", "A taxonomy cannot be found corresponding to a namespace", array(
							'dimension' => "'$dimLabel'",
							'namespace' => $dimension['member_namespace'] ? "'{$dimension['member_namespace']}'" : "Undefined",
						) );
						continue;
					}
					$roleMembers += $taxonomy->getDefinitionRoleDimensionMembers( $dimension['targetRole'] );
				}
			}

			return $roleMembers;
		}
		else if ( strpos( $role['href'], $this->getTaxonomyXSD() ) === false )
		{
			$roleMembers = $this->getTaxonomyForXSD( $role['href'] )->getDefinitionRoleDimensionMembers( $roleRefsKey );
			return $roleMembers;
		}

		foreach ( $roleMembers as $memberKey => $member )
		{
			if ( ! isset( $roleMembers[ $memberKey ]['roles'] ) )
			{
				$roleMembers[ $memberKey ]['roles'] = $roleRefsKey;
			}
			else
			{
				// Add unique roleRefsKey
				if ( in_array( $roleRefsKey, $roleMembers[ $memberKey ]['roles'] ) ) continue;
				$roleMembers[ $memberKey ]['roles'][] = $roleRefsKey;
			}
		}

		return $roleMembers;

		$result = array();

		foreach ( $roleMembers as $memberKey => $member )
		{
			if ( ! isset( $result[ $memberKey ] ) )
			{
				$result[ $memberKey ] = array( 'href' => $member, 'roles' => array( $roleRefsKey ) );
				continue;
			}

			// Add unique roleRefsKey
			if ( in_array( $roleRefsKey, $result[ $memberKey ]['roles'] ) ) continue;
			$result[ $memberKey ]['roles'][] = $roleRefsKey;
		}

		return $result;
		*/
	}
public function getDefinitionRoleDimensionMembers ( $ roleRefsKey ) { $ roles = $ this -> getAllDefinitionRoles ( ) ; if ( ! isset ( $ roles [ $ roleRefsKey ] ) ) { return array ( ) ; } $ taxonomy = $ this -> getTaxonomyForXSD ( $ roles [ $ roleRefsKey ] ) ; $ role = $ taxonomy -> getDefinitionRoleRef ( $ roleRefsKey ) ; return isset ( $ role [ 'members' ] ) ? $ role [ 'members' ] : array ( ) ; /*
		$roleMembers = array();
		if ( ! isset( $this->definitionRoleRefs[ $roleRefsKey ] ) ) return array();

		$role = $this->definitionRoleRefs[ $roleRefsKey ];

		if ( isset( $role['members'] ) && count( $role['members'] ) )
		{
			$roleMembers = $role['members'];
		}
		else if ( isset( $role['hypercubes'] ) && count( $role['hypercubes'] ) )
		{
			foreach ( $role['hypercubes'] as $hypercubeLabel => $hypercube )
			{
				foreach ( $hypercube['dimensions'] as $dimLabel => $dimension )
				{
					if ( ! isset( $dimension['targetRole'] ) ) continue;
					$taxonomy = $this->getTaxonomyForNamespace( $dimension['member_namespace'] );
					if ( ! $taxonomy )
					{
						$this->log()->dimension_validation( "dimensions", "A taxonomy cannot be found corresponding to a namespace", array(
							'dimension' => "'$dimLabel'",
							'namespace' => $dimension['member_namespace'] ? "'{$dimension['member_namespace']}'" : "Undefined",
						) );
						continue;
					}
					$roleMembers += $taxonomy->getDefinitionRoleDimensionMembers( $dimension['targetRole'] );
				}
			}

			return $roleMembers;
		}
		else if ( strpos( $role['href'], $this->getTaxonomyXSD() ) === false )
		{
			$roleMembers = $this->getTaxonomyForXSD( $role['href'] )->getDefinitionRoleDimensionMembers( $roleRefsKey );
			return $roleMembers;
		}

		foreach ( $roleMembers as $memberKey => $member )
		{
			if ( ! isset( $roleMembers[ $memberKey ]['roles'] ) )
			{
				$roleMembers[ $memberKey ]['roles'] = $roleRefsKey;
			}
			else
			{
				// Add unique roleRefsKey
				if ( in_array( $roleRefsKey, $roleMembers[ $memberKey ]['roles'] ) ) continue;
				$roleMembers[ $memberKey ]['roles'][] = $roleRefsKey;
			}
		}

		return $roleMembers;

		$result = array();

		foreach ( $roleMembers as $memberKey => $member )
		{
			if ( ! isset( $result[ $memberKey ] ) )
			{
				$result[ $memberKey ] = array( 'href' => $member, 'roles' => array( $roleRefsKey ) );
				continue;
			}

			// Add unique roleRefsKey
			if ( in_array( $roleRefsKey, $result[ $memberKey ]['roles'] ) ) continue;
			$result[ $memberKey ]['roles'][] = $roleRefsKey;
		}

		return $result;
		*/ }
Provide access to the definitionRole dimension members array for a specific role
@param string $roleRefsKey The name of the role
@return array A list of dimension members
Provide access to the definitionRole dimension members array for a specific role