XBRL.php
public function getGenericLabel( $searchRole, $searchLabel = null, $searchLang = null, $linkPath = null )
	{
		if ( ! isset( $this->genericRoles['roles'] ) ) return false;

		$results = array();

		if ( ! isset( $this->genericRoles['roles'][ $searchRole ]['labels'] ) ) return $results;

		foreach ( $this->genericRoles['roles'][ $searchRole ]['labels'] as $linkbase => $labels )
		{
			foreach ( $labels as $label => $langs )
			{
				if ( ! is_null( $searchLabel ) && $label != $searchLabel ) continue;

				foreach ( $langs['lang'] as $lang => $text )
				{
					if ( ! is_null( $searchLang ) && $lang != $searchLang ) continue;

					$results[ $label ] = array(
						'linkbase' => $linkbase,
						'label' => $label,
						'lang' => $lang,
						'text' => isset( $text[ $linkPath ] ) ? $text[ $linkPath] : reset( $text ),
					);
				}

				if ( ! is_null( $searchLabel ) )
				{
					return $results;
				}
			}
		}

		return $results;
	}
public function getGenericLabel( $searchRole, $searchLabel = null, $searchLang = null, $linkPath = null )
	{
		if ( ! isset( $this->genericRoles['roles'] ) ) return false;

		$results = array();

		if ( ! isset( $this->genericRoles['roles'][ $searchRole ]['labels'] ) ) return $results;

		foreach ( $this->genericRoles['roles'][ $searchRole ]['labels'] as $linkbase => $labels )
		{
			foreach ( $labels as $label => $langs )
			{
				if ( ! is_null( $searchLabel ) && $label != $searchLabel ) continue;

				foreach ( $langs['lang'] as $lang => $text )
				{
					if ( ! is_null( $searchLang ) && $lang != $searchLang ) continue;

					$results[ $label ] = array(
						'linkbase' => $linkbase,
						'label' => $label,
						'lang' => $lang,
						'text' => isset( $text[ $linkPath ] ) ? $text[ $linkPath] : reset( $text ),
					);
				}

				if ( ! is_null( $searchLabel ) )
				{
					return $results;
				}
			}
		}

		return $results;
	}
public function getGenericLabel ( $ searchRole , $ searchLabel = null , $ searchLang = null , $ linkPath = null ) { if ( ! isset ( $ this -> genericRoles [ 'roles' ] ) ) return false ; $ results = array ( ) ; if ( ! isset ( $ this -> genericRoles [ 'roles' ] [ $ searchRole ] [ 'labels' ] ) ) return $ results ; foreach ( $ this -> genericRoles [ 'roles' ] [ $ searchRole ] [ 'labels' ] as $ linkbase => $ labels ) { foreach ( $ labels as $ label => $ langs ) { if ( ! is_null ( $ searchLabel ) && $ label != $ searchLabel ) continue ; foreach ( $ langs [ 'lang' ] as $ lang => $ text ) { if ( ! is_null ( $ searchLang ) && $ lang != $ searchLang ) continue ; $ results [ $ label ] = array ( 'linkbase' => $ linkbase , 'label' => $ label , 'lang' => $ lang , 'text' => isset ( $ text [ $ linkPath ] ) ? $ text [ $ linkPath ] : reset ( $ text ) , ) ; } if ( ! is_null ( $ searchLabel ) ) { return $ results ; } } } return $ results ; }
Get the generic label resource for the give role, label and language
@param string $searchRole
@param string $searchLabel
@param string $searchLang
@param string $linkPath
@return boolean|unknown[][]|mixed[][]
Get the generic label resource for the give role label and language