private function getStatusIndex($statusname)
    {
        $status_count = count($this->states);
        for ($i = 0; $i < $status_count; ++$i) {
            if ($this->states[$i]->getName() == $statusname) {
                return $i;
            }
        }
    }
private function getStatusIndex($statusname)
    {
        $status_count = count($this->states);
        for ($i = 0; $i < $status_count; ++$i) {
            if ($this->states[$i]->getName() == $statusname) {
                return $i;
            }
        }
    }
private function getStatusIndex ( $ statusname ) { $ status_count = count ( $ this -> states ) ; for ( $ i = 0 ; $ i < $ status_count ; ++ $ i ) { if ( $ this -> states [ $ i ] -> getName ( ) == $ statusname ) { return $ i ; } } }
Get the position of a state.

@param $statusname

@return int
Get the position of a state .