public function phoneme($string = '', $language = 'french')
        {
            $parts      = explode(' ', $string);
            $phonemes   = array();

            foreach ($parts as $p) {
                $p = $this->partCases(Inflector::lower($p));
                $phon = $this->$language($p);

                if ($phon != ' ' && strlen($phon)) {
                    array_push($phonemes, $phon);
                }
            }

            if($this->_sort) {
                sort($phonemes);
            }

            $string = implode(' ', $phonemes);

            return $string;
        }
public function phoneme($string = '', $language = 'french')
        {
            $parts      = explode(' ', $string);
            $phonemes   = array();

            foreach ($parts as $p) {
                $p = $this->partCases(Inflector::lower($p));
                $phon = $this->$language($p);

                if ($phon != ' ' && strlen($phon)) {
                    array_push($phonemes, $phon);
                }
            }

            if($this->_sort) {
                sort($phonemes);
            }

            $string = implode(' ', $phonemes);

            return $string;
        }
public function phoneme ( $ string = '' , $ language = 'french' ) { $ parts = explode ( ' ' , $ string ) ; $ phonemes = array ( ) ; foreach ( $ parts as $ p ) { $ p = $ this -> partCases ( Inflector :: lower ( $ p ) ) ; $ phon = $ this -> $ language ( $ p ) ; if ( $ phon != ' ' && strlen ( $ phon ) ) { array_push ( $ phonemes , $ phon ) ; } } if ( $ this -> _sort ) { sort ( $ phonemes ) ; } $ string = implode ( ' ' , $ phonemes ) ; return $ string ; }
Transform a given string into its phoneme equivalent.

@param string $string The string to be transformed in phonemes.
@param string $language The language to make phonemes
@return string Phoneme string.
Transform a given string into its phoneme equivalent .