XBRL-Instance.php
public function EntityContexts( $entity, $scheme = null )
	{
		$filtered = array_filter( $this->contexts, function ( $context ) use( $entity, $scheme ) {

			// The context may be invalid in which case exclude
			if ( ! isset( $context['entity']['identifier']['value'] ) ) return false;

			if ( $context['entity']['identifier']['value'] == $entity )
			{
				// If supplied also check the scheme
				return $scheme != null && isset( $context['entity']['identifier']['scheme'] )
				? ( strtolower( $scheme ) == strtolower( $context['entity']['identifier']['scheme'] ) )
				: true;
			}

			return false;
		} );

		return new ContextsFilter( $this->instance, $filtered );
	}
public function EntityContexts( $entity, $scheme = null )
	{
		$filtered = array_filter( $this->contexts, function ( $context ) use( $entity, $scheme ) {

			// The context may be invalid in which case exclude
			if ( ! isset( $context['entity']['identifier']['value'] ) ) return false;

			if ( $context['entity']['identifier']['value'] == $entity )
			{
				// If supplied also check the scheme
				return $scheme != null && isset( $context['entity']['identifier']['scheme'] )
				? ( strtolower( $scheme ) == strtolower( $context['entity']['identifier']['scheme'] ) )
				: true;
			}

			return false;
		} );

		return new ContextsFilter( $this->instance, $filtered );
	}
public function EntityContexts ( $ entity , $ scheme = null ) { $ filtered = array_filter ( $ this -> contexts , function ( $ context ) use ( $ entity , $ scheme ) { // The context may be invalid in which case exclude
 if ( ! isset ( $ context [ 'entity' ] [ 'identifier' ] [ 'value' ] ) ) return false ; if ( $ context [ 'entity' ] [ 'identifier' ] [ 'value' ] == $ entity ) { // If supplied also check the scheme
 return $ scheme != null && isset ( $ context [ 'entity' ] [ 'identifier' ] [ 'scheme' ] ) ? ( strtolower ( $ scheme ) == strtolower ( $ context [ 'entity' ] [ 'identifier' ] [ 'scheme' ] ) ) : true ; } return false ; } ) ; return new ContextsFilter ( $ this -> instance , $ filtered ) ; }
Returns the context for a specfic entity
@param string $entity The value identifying the entity
@param string $scheme Optionally the scheme associated with the value
@return ContextsFilter
Returns the context for a specfic entity