public function getIndex()
	{
		$index = false;
		
		// if this element has a parent
		if ( ! empty($this->parent)) {
			$index = $this->parent->getChildIndex($this);
			// if we didn't find the child, something is wrong 
			if ($index === false) {
				throw new \BadMethodCallException(
					__METHOD__."() expects this element to be a child of its parent"
				);
			}
		} else {
			throw new \BadMethodCallException(
				__METHOD__."() expects this element to have a parent element"
			);
		}
		
		return $index;
	}