original_string: protected function yearToHebrewNumerals($year, $alafim_geresh, $alafim, $gereshayim)
      {
          if ($year < 1000) {
              return $this->numberToHebrewNumeralsIso8859($year, $gereshayim);
          } else {
              $thousands = $this->numberToHebrewNumeralsIso8859((int) ($year / 1000), false);
              if ($alafim_geresh) {
                  $thousands .= self::GERESH_ISO8859;
              }
              if ($alafim) {
                  $thousands .= ' ' . self::ALAFIM_ISO8859 . ' ';
              }
  
              return $thousands . $this->numberToHebrewNumeralsIso8859($year % 1000, $gereshayim);
          }
      }
code: protected function yearToHebrewNumerals($year, $alafim_geresh, $alafim, $gereshayim)
      {
          if ($year < 1000) {
              return $this->numberToHebrewNumeralsIso8859($year, $gereshayim);
          } else {
              $thousands = $this->numberToHebrewNumeralsIso8859((int) ($year / 1000), false);
              if ($alafim_geresh) {
                  $thousands .= self::GERESH_ISO8859;
              }
              if ($alafim) {
                  $thousands .= ' ' . self::ALAFIM_ISO8859 . ' ';
              }
  
              return $thousands . $this->numberToHebrewNumeralsIso8859($year % 1000, $gereshayim);
          }
      }
code_tokens: protected function yearToHebrewNumerals ( $ year , $ alafim_geresh , $ alafim , $ gereshayim ) { if ( $ year < 1000 ) { return $ this -> numberToHebrewNumeralsIso8859 ( $ year , $ gereshayim ) ; } else { $ thousands = $ this -> numberToHebrewNumeralsIso8859 ( ( int ) ( $ year / 1000 ) , false ) ; if ( $ alafim_geresh ) { $ thousands .= self :: GERESH_ISO8859 ; } if ( $ alafim ) { $ thousands .= ' ' . self :: ALAFIM_ISO8859 . ' ' ; } return $ thousands . $ this -> numberToHebrewNumeralsIso8859 ( $ year % 1000 , $ gereshayim ) ; } }
docstring: Format a year using Hebrew numerals.
  
  @param int  $year
  @param bool $alafim_geresh Add a geresh  (׳) after thousands
  @param bool $alafim        Add the word for thousands after the thousands
  @param bool $gereshayim    Add geresh (׳) and gershayim (״) punctuation to numeric values
  
  @return string
docstring_tokens: Format a year using Hebrew numerals .