XBRL-Instance.php
public function AllNamespaces()
	{
		// In PHP 7.0 $this is passed to closure functions automatically but not in earlier versions
		$contexts = &$this->contexts;
		$instance = &$this->instance;

		$result = array_reduce( array_keys( $this->contexts ), function( $carry, $context ) use( &$contexts, &$instance ) {

			// The context may be invalid in which case exclude
			if ( ! isset( $contexts[ $context ]['entity']['segment']['explicitMember'] ) || count( $contexts[ $context ]['entity']['segment']['explicitMember'] ) == 0 )
				return $carry;

			// Each context may have more than one segment.  If the filter matches any one segment the context will be included.
			$context_segments = $instance->getElementsForContext( $context, true );

			foreach ( $context_segments as $key => $segment )
			{
				if ( ! isset( $segment['dimension']['namespace'] ) || isset( $carry[ $segment['dimension']['namespace'] ] ) ) continue;
				$carry[ $segment['dimension']['namespace'] ] = 1;

				if ( ! isset( $segment['member']['namespace'] ) || isset( $carry[ $segment['dimension']['namespace'] ] ) ) continue;
				$carry[ $segment['member']['namespace'] ] = 1;
			}

			return $carry;

		}, array() );

			return array_keys( $result );
	}
public function AllNamespaces()
	{
		// In PHP 7.0 $this is passed to closure functions automatically but not in earlier versions
		$contexts = &$this->contexts;
		$instance = &$this->instance;

		$result = array_reduce( array_keys( $this->contexts ), function( $carry, $context ) use( &$contexts, &$instance ) {

			// The context may be invalid in which case exclude
			if ( ! isset( $contexts[ $context ]['entity']['segment']['explicitMember'] ) || count( $contexts[ $context ]['entity']['segment']['explicitMember'] ) == 0 )
				return $carry;

			// Each context may have more than one segment.  If the filter matches any one segment the context will be included.
			$context_segments = $instance->getElementsForContext( $context, true );

			foreach ( $context_segments as $key => $segment )
			{
				if ( ! isset( $segment['dimension']['namespace'] ) || isset( $carry[ $segment['dimension']['namespace'] ] ) ) continue;
				$carry[ $segment['dimension']['namespace'] ] = 1;

				if ( ! isset( $segment['member']['namespace'] ) || isset( $carry[ $segment['dimension']['namespace'] ] ) ) continue;
				$carry[ $segment['member']['namespace'] ] = 1;
			}

			return $carry;

		}, array() );

			return array_keys( $result );
	}
public function AllNamespaces ( ) { // In PHP 7.0 $this is passed to closure functions automatically but not in earlier versions
 $ contexts = & $ this -> contexts ; $ instance = & $ this -> instance ; $ result = array_reduce ( array_keys ( $ this -> contexts ) , function ( $ carry , $ context ) use ( & $ contexts , & $ instance ) { // The context may be invalid in which case exclude
 if ( ! isset ( $ contexts [ $ context ] [ 'entity' ] [ 'segment' ] [ 'explicitMember' ] ) || count ( $ contexts [ $ context ] [ 'entity' ] [ 'segment' ] [ 'explicitMember' ] ) == 0 ) return $ carry ; // Each context may have more than one segment.  If the filter matches any one segment the context will be included.
 $ context_segments = $ instance -> getElementsForContext ( $ context , true ) ; foreach ( $ context_segments as $ key => $ segment ) { if ( ! isset ( $ segment [ 'dimension' ] [ 'namespace' ] ) || isset ( $ carry [ $ segment [ 'dimension' ] [ 'namespace' ] ] ) ) continue ; $ carry [ $ segment [ 'dimension' ] [ 'namespace' ] ] = 1 ; if ( ! isset ( $ segment [ 'member' ] [ 'namespace' ] ) || isset ( $ carry [ $ segment [ 'dimension' ] [ 'namespace' ] ] ) ) continue ; $ carry [ $ segment [ 'member' ] [ 'namespace' ] ] = 1 ; } return $ carry ; } , array ( ) ) ; return array_keys ( $ result ) ; }
Return an array of all namespaces used by the contexts
@return array of strings
Return an array of all namespaces used by the contexts