public function setDictionaryFromFile( $path ) {
    if ( file_exists( $path ) ) {
      $dict = include $path;
      if( is_array($dict) ) {
        $this->dictionary = $dict;
        $this->fillDictionaryWords();
        return $this;
      }
      throw new \Exception('The file content must be an array!');
    }
    throw new \Exception('File not found in ' . $path );
  }
public function setDictionaryFromFile( $path ) {
    if ( file_exists( $path ) ) {
      $dict = include $path;
      if( is_array($dict) ) {
        $this->dictionary = $dict;
        $this->fillDictionaryWords();
        return $this;
      }
      throw new \Exception('The file content must be an array!');
    }
    throw new \Exception('File not found in ' . $path );
  }
public function setDictionaryFromFile ( $ path ) { if ( file_exists ( $ path ) ) { $ dict = include $ path ; if ( is_array ( $ dict ) ) { $ this -> dictionary = $ dict ; $ this -> fillDictionaryWords ( ) ; return $ this ; } throw new \ Exception ( 'The file content must be an array!' ) ; } throw new \ Exception ( 'File not found in ' . $ path ) ; }
Set the bad words list from a file

@param  string
@return this
@throws \Exception
Set the bad words list from a file