Beispiel #1
0
 /**
  * Encodes the given string and returns the numeral representation.
  * @param $string
  * @return string
  */
 public function encode($string)
 {
     $result = "";
     foreach (str_split(strtoupper($string)) as $character) {
         $result .= $this->alphabet->getNumber($character);
     }
     return $result;
 }