models/Vote.php
protected static function modelEntityType($model)
    {
        if ($model instanceof QuestionInterface) {
            return self::ENTITY_QUESTION;
        } elseif ($model instanceof AnswerInterface) {
            return self::ENTITY_ANSWER;
        } else {
            $className = get_class($model);
            throw new UnknownClassException("Model class '{$className}' not supported");
        }
    }
protected static function modelEntityType($model)
    {
        if ($model instanceof QuestionInterface) {
            return self::ENTITY_QUESTION;
        } elseif ($model instanceof AnswerInterface) {
            return self::ENTITY_ANSWER;
        } else {
            $className = get_class($model);
            throw new UnknownClassException("Model class '{$className}' not supported");
        }
    }
protected static function modelEntityType ( $ model ) { if ( $ model instanceof QuestionInterface ) { return self :: ENTITY_QUESTION ; } elseif ( $ model instanceof AnswerInterface ) { return self :: ENTITY_ANSWER ; } else { $ className = get_class ( $ model ) ; throw new UnknownClassException ( "Model class '{$className}' not supported" ) ; } }
Get entity type by given instance of model
@param $model
@throws UnknownClassException
@return string
Get entity type by given instance of model