src/ShopBundle/objects/db/TShopArticleReviewList.class.php
public function GetAverageScore()
    {
        $dAvgScore = 0;
        if ($this->Length() > 0) {
            $iPt = $this->getItemPointer();
            $this->GoToStart();
            $dScore = 0;
            while ($oitem = &$this->Next()) {
                $dScore += $oitem->fieldRating;
            }
            $this->setItemPointer($iPt);

            $dAvgScore = $dScore / $this->Length();
        }

        return $dAvgScore;
    }
public function GetAverageScore()
    {
        $dAvgScore = 0;
        if ($this->Length() > 0) {
            $iPt = $this->getItemPointer();
            $this->GoToStart();
            $dScore = 0;
            while ($oitem = &$this->Next()) {
                $dScore += $oitem->fieldRating;
            }
            $this->setItemPointer($iPt);

            $dAvgScore = $dScore / $this->Length();
        }

        return $dAvgScore;
    }
public function GetAverageScore ( ) { $ dAvgScore = 0 ; if ( $ this -> Length ( ) > 0 ) { $ iPt = $ this -> getItemPointer ( ) ; $ this -> GoToStart ( ) ; $ dScore = 0 ; while ( $ oitem = & $ this -> Next ( ) ) { $ dScore += $ oitem -> fieldRating ; } $ this -> setItemPointer ( $ iPt ) ; $ dAvgScore = $ dScore / $ this -> Length ( ) ; } return $ dAvgScore ; }
return the average score for the review list.

@return float
return the average score for the review list .