XBRL.php
private function validateArcAttributes( $linkbase, $from, $to, $attributes )
	{
		$result['priority'] = property_exists( $attributes, 'priority' ) ? (string) $attributes->priority	: "0";
		$result['use']		= property_exists( $attributes, 'use' ) 	 ? (string) $attributes->use		: XBRL_Constants::$xlinkUseOptional;
		$result['order']	= property_exists( $attributes, 'order' ) 	 ? (string) $attributes->order		: "1";
		$result['title']	= property_exists( $attributes, 'title' ) 	 ? (string) $attributes->title		: "";

		if ( filter_var( $result['priority'], FILTER_VALIDATE_INT ) === false )
		{
			$this->log()->taxonomy_validation( "3.5.3.9.5", "The arc priority value MUST be an integer",
				array(
					'linkbase' => $linkbase,
					'from' => $fromLabel,
					'to' => $toLabel,
					'priority' => $result['priority'],
				)
			);
		}

		if ( ! in_array( $result['use'], XBRL_Constants::$xlinkUseValues ) )
		{
			$this->log()->taxonomy_validation( "3.5.3.9.5", "The arc priority value MUST be an integer",
				array(
					'linkbase' => $linkbase,
					'from' => $fromLabel,
					'to' => $toLabel,
					'use' => $result['use'],
				)
			);
		}

		if ( ! is_numeric( $result['order'] ) )
		{
			$this->log()->taxonomy_validation( "3.5.3.9.5", "The arc order value MUST be numeric",
				array(
					'linkbase' => $linkbase,
					'from' => $fromLabel,
					'to' => $toLabel,
					'order' => $result['order'],
				)
			);
		}

		return $result;
	}
private function validateArcAttributes( $linkbase, $from, $to, $attributes )
	{
		$result['priority'] = property_exists( $attributes, 'priority' ) ? (string) $attributes->priority	: "0";
		$result['use']		= property_exists( $attributes, 'use' ) 	 ? (string) $attributes->use		: XBRL_Constants::$xlinkUseOptional;
		$result['order']	= property_exists( $attributes, 'order' ) 	 ? (string) $attributes->order		: "1";
		$result['title']	= property_exists( $attributes, 'title' ) 	 ? (string) $attributes->title		: "";

		if ( filter_var( $result['priority'], FILTER_VALIDATE_INT ) === false )
		{
			$this->log()->taxonomy_validation( "3.5.3.9.5", "The arc priority value MUST be an integer",
				array(
					'linkbase' => $linkbase,
					'from' => $fromLabel,
					'to' => $toLabel,
					'priority' => $result['priority'],
				)
			);
		}

		if ( ! in_array( $result['use'], XBRL_Constants::$xlinkUseValues ) )
		{
			$this->log()->taxonomy_validation( "3.5.3.9.5", "The arc priority value MUST be an integer",
				array(
					'linkbase' => $linkbase,
					'from' => $fromLabel,
					'to' => $toLabel,
					'use' => $result['use'],
				)
			);
		}

		if ( ! is_numeric( $result['order'] ) )
		{
			$this->log()->taxonomy_validation( "3.5.3.9.5", "The arc order value MUST be numeric",
				array(
					'linkbase' => $linkbase,
					'from' => $fromLabel,
					'to' => $toLabel,
					'order' => $result['order'],
				)
			);
		}

		return $result;
	}
private function validateArcAttributes ( $ linkbase , $ from , $ to , $ attributes ) { $ result [ 'priority' ] = property_exists ( $ attributes , 'priority' ) ? ( string ) $ attributes -> priority : "0" ; $ result [ 'use' ] = property_exists ( $ attributes , 'use' ) ? ( string ) $ attributes -> use : XBRL_Constants :: $ xlinkUseOptional ; $ result [ 'order' ] = property_exists ( $ attributes , 'order' ) ? ( string ) $ attributes -> order : "1" ; $ result [ 'title' ] = property_exists ( $ attributes , 'title' ) ? ( string ) $ attributes -> title : "" ; if ( filter_var ( $ result [ 'priority' ] , FILTER_VALIDATE_INT ) === false ) { $ this -> log ( ) -> taxonomy_validation ( "3.5.3.9.5" , "The arc priority value MUST be an integer" , array ( 'linkbase' => $ linkbase , 'from' => $ fromLabel , 'to' => $ toLabel , 'priority' => $ result [ 'priority' ] , ) ) ; } if ( ! in_array ( $ result [ 'use' ] , XBRL_Constants :: $ xlinkUseValues ) ) { $ this -> log ( ) -> taxonomy_validation ( "3.5.3.9.5" , "The arc priority value MUST be an integer" , array ( 'linkbase' => $ linkbase , 'from' => $ fromLabel , 'to' => $ toLabel , 'use' => $ result [ 'use' ] , ) ) ; } if ( ! is_numeric ( $ result [ 'order' ] ) ) { $ this -> log ( ) -> taxonomy_validation ( "3.5.3.9.5" , "The arc order value MUST be numeric" , array ( 'linkbase' => $ linkbase , 'from' => $ fromLabel , 'to' => $ toLabel , 'order' => $ result [ 'order' ] , ) ) ; } return $ result ; }
Check the priority, order and use attributes and return them in an indexed array
@param string $linkbase
@param string $from
@param string $to
@param SimpleXMLElement $attributes
@return array
Check the priority order and use attributes and return them in an indexed array