XBRL-Instance.php
public function getPrefixForNamespace( $namespace )
	{
		if (
			  ! isset( $this->cacheNamespaces ) ||
			  count( $this->cacheNamespaces ) != count( $this->instance_namespaces )
		   )
		{
			$this->cacheNamespaces = array_flip( $this->instance_namespaces );
			// If the default namespace is one of the standards ones then the prefix may be missing
			$standardNamespaces = array_flip( XBRL_Constants::$standardPrefixes );
			if ( isset( $this->instance_namespaces[''] ) )
			{
				if ( isset( $standardNamespaces[ $this->instance_namespaces[''] ] ) )
				{
					$this->cacheNamespaces[ $this->instance_namespaces[''] ] = $standardNamespaces[ $this->instance_namespaces[''] ];
				}
			}
		}

		return isset( $this->cacheNamespaces[ $namespace ] )
			? $this->cacheNamespaces[ $namespace ]
			: false;
	}
public function getPrefixForNamespace( $namespace )
	{
		if (
			  ! isset( $this->cacheNamespaces ) ||
			  count( $this->cacheNamespaces ) != count( $this->instance_namespaces )
		   )
		{
			$this->cacheNamespaces = array_flip( $this->instance_namespaces );
			// If the default namespace is one of the standards ones then the prefix may be missing
			$standardNamespaces = array_flip( XBRL_Constants::$standardPrefixes );
			if ( isset( $this->instance_namespaces[''] ) )
			{
				if ( isset( $standardNamespaces[ $this->instance_namespaces[''] ] ) )
				{
					$this->cacheNamespaces[ $this->instance_namespaces[''] ] = $standardNamespaces[ $this->instance_namespaces[''] ];
				}
			}
		}

		return isset( $this->cacheNamespaces[ $namespace ] )
			? $this->cacheNamespaces[ $namespace ]
			: false;
	}
public function getPrefixForNamespace ( $ namespace ) { if ( ! isset ( $ this -> cacheNamespaces ) || count ( $ this -> cacheNamespaces ) != count ( $ this -> instance_namespaces ) ) { $ this -> cacheNamespaces = array_flip ( $ this -> instance_namespaces ) ; // If the default namespace is one of the standards ones then the prefix may be missing
 $ standardNamespaces = array_flip ( XBRL_Constants :: $ standardPrefixes ) ; if ( isset ( $ this -> instance_namespaces [ '' ] ) ) { if ( isset ( $ standardNamespaces [ $ this -> instance_namespaces [ '' ] ] ) ) { $ this -> cacheNamespaces [ $ this -> instance_namespaces [ '' ] ] = $ standardNamespaces [ $ this -> instance_namespaces [ '' ] ] ; } } } return isset ( $ this -> cacheNamespaces [ $ namespace ] ) ? $ this -> cacheNamespaces [ $ namespace ] : false ; }
Get the prefix of a namespace

@param string $namespace
@return string|false  Will return the prefix or false if one does not exist
Get the prefix of a namespace