public function setTranslator($class) {
        if (is_string($class)) {
            $this->_translator = new $class;
        } else {
            $this->_translator = $class;
        }
        if (!is_a($this->_translator, '\\mpf\\interfaces\\TranslatorInterface')) {
            $this->_translator = null;
            throw new Exception("Invalid translator $class!  Must implement \\mpf\\interfaces\\TranslatorInterface!");
        }
        $this->translator = $class;
    }
public function setTranslator($class) {
        if (is_string($class)) {
            $this->_translator = new $class;
        } else {
            $this->_translator = $class;
        }
        if (!is_a($this->_translator, '\\mpf\\interfaces\\TranslatorInterface')) {
            $this->_translator = null;
            throw new Exception("Invalid translator $class!  Must implement \\mpf\\interfaces\\TranslatorInterface!");
        }
        $this->translator = $class;
    }
public function setTranslator ( $ class ) { if ( is_string ( $ class ) ) { $ this -> _translator = new $ class ; } else { $ this -> _translator = $ class ; } if ( ! is_a ( $ this -> _translator , '\\mpf\\interfaces\\TranslatorInterface' ) ) { $ this -> _translator = null ; throw new Exception ( "Invalid translator $class!  Must implement \\mpf\\interfaces\\TranslatorInterface!" ) ; } $ this -> translator = $ class ; }
Set a new translator. Can be sent as class name or class instance;
@param string|\mpf\interfaces\TranslatorInterface $class
@throws \mpf\translators\Exception
Set a new translator . Can be sent as class name or class instance ;