src/Pinyin.php
public function convert($string, $option = PINYIN_DEFAULT)
    {
        $pinyin = $this->romanize($string, $option);

        return $this->splitWords($pinyin, $option);
    }
public function convert($string, $option = PINYIN_DEFAULT)
    {
        $pinyin = $this->romanize($string, $option);

        return $this->splitWords($pinyin, $option);
    }
public function convert ( $ string , $ option = PINYIN_DEFAULT ) { $ pinyin = $ this -> romanize ( $ string , $ option ) ; return $ this -> splitWords ( $ pinyin , $ option ) ; }
Convert string to pinyin.

@param string $string
@param int    $option

@return array
Convert string to pinyin .