public function getIndex ()
  {
    if (!isset($this->parent))
      throw new ComponentException($this, "The component is not attached to a parent.");
    if (!$this->parent->children)
      throw new ComponentException($this, "The parent component has no children.");

    return array_search ($this, $this->parent->children, true);
  }
public function getIndex ()
  {
    if (!isset($this->parent))
      throw new ComponentException($this, "The component is not attached to a parent.");
    if (!$this->parent->children)
      throw new ComponentException($this, "The parent component has no children.");

    return array_search ($this, $this->parent->children, true);
  }
public function getIndex ( ) { if ( ! isset ( $ this -> parent ) ) throw new ComponentException ( $ this , "The component is not attached to a parent." ) ; if ( ! $ this -> parent -> children ) throw new ComponentException ( $ this , "The parent component has no children." ) ; return array_search ( $ this , $ this -> parent -> children , true ) ; }
Returns the ordinal index of this component on the parent's child list.

@return int|boolean
@throws ComponentException
Returns the ordinal index of this component on the parent s child list .