public function check($model)
    {
        $moderated = false;

        foreach ($model->getModerateList() as $id => $moderation) {
            $rules = explode('|', $moderation);

            foreach ($rules as $rule) {
                $action = explode(':', $rule);
                $options = isset($action[1]) ? $action[1] : null;

                $method = $action[0];
                if ($this->$method($model->$id, $options)) {
                    return $moderated = true;
                }
            }

            // No reason to keep going
            if ($moderated === true) {
                return $moderated;
            }
        }

        return $moderated;
    }
public function check($model)
    {
        $moderated = false;

        foreach ($model->getModerateList() as $id => $moderation) {
            $rules = explode('|', $moderation);

            foreach ($rules as $rule) {
                $action = explode(':', $rule);
                $options = isset($action[1]) ? $action[1] : null;

                $method = $action[0];
                if ($this->$method($model->$id, $options)) {
                    return $moderated = true;
                }
            }

            // No reason to keep going
            if ($moderated === true) {
                return $moderated;
            }
        }

        return $moderated;
    }
public function check ( $ model ) { $ moderated = false ; foreach ( $ model -> getModerateList ( ) as $ id => $ moderation ) { $ rules = explode ( '|' , $ moderation ) ; foreach ( $ rules as $ rule ) { $ action = explode ( ':' , $ rule ) ; $ options = isset ( $ action [ 1 ] ) ? $ action [ 1 ] : null ; $ method = $ action [ 0 ] ; if ( $ this -> $ method ( $ model -> $ id , $ options ) ) { return $ moderated = true ; } } // No reason to keep going if ( $ moderated === true ) { return $ moderated ; } } return $ moderated ; }
Check model using the moderate rules.

@param object $model

@return bool
Check model using the moderate rules .