XBRL.php
public function &getElementByName( $name )
	{
		$defaultResult = array();

		if ( ! property_exists( $this, 'elements_by_name' ) )
		{
			$this->elements_by_name = array();

			foreach ( $this->elementIndex as $elementsKey => &$element )
			{
				$this->elements_by_name[ $element['name'] ]  = &$element;
			}
		}

		if ( isset( $this->elements_by_name[ $name ] ) )
		{
			return $this->elements_by_name[ $name ];
		}
		return $defaultResult;

		return isset( $this->elements_by_name[ $name ] ) ? $this->elements_by_name[ $name ] : $defaultResult;
	}
public function &getElementByName( $name )
	{
		$defaultResult = array();

		if ( ! property_exists( $this, 'elements_by_name' ) )
		{
			$this->elements_by_name = array();

			foreach ( $this->elementIndex as $elementsKey => &$element )
			{
				$this->elements_by_name[ $element['name'] ]  = &$element;
			}
		}

		if ( isset( $this->elements_by_name[ $name ] ) )
		{
			return $this->elements_by_name[ $name ];
		}
		return $defaultResult;

		return isset( $this->elements_by_name[ $name ] ) ? $this->elements_by_name[ $name ] : $defaultResult;
	}
public function & getElementByName ( $ name ) { $ defaultResult = array ( ) ; if ( ! property_exists ( $ this , 'elements_by_name' ) ) { $ this -> elements_by_name = array ( ) ; foreach ( $ this -> elementIndex as $ elementsKey => & $ element ) { $ this -> elements_by_name [ $ element [ 'name' ] ] = & $ element ; } } if ( isset ( $ this -> elements_by_name [ $ name ] ) ) { return $ this -> elements_by_name [ $ name ] ; } return $ defaultResult ; return isset ( $ this -> elements_by_name [ $ name ] ) ? $ this -> elements_by_name [ $ name ] : $ defaultResult ; }
Gets an element based on its name
@param string $name The name of the element to return
@return An element array or false
Gets an element based on its name