src/Pinyin.php
public function permalink($string, $delimiter = '-', $option = PINYIN_DEFAULT)
    {
        if (\is_int($delimiter)) {
            list($option, $delimiter) = array($delimiter, '-');
        }

        if (!in_array($delimiter, array('_', '-', '.', ''), true)) {
            throw new InvalidArgumentException("Delimiter must be one of: '_', '-', '', '.'.");
        }

        return implode($delimiter, $this->convert($string, $option | \PINYIN_KEEP_NUMBER | \PINYIN_KEEP_ENGLISH));
    }
public function permalink($string, $delimiter = '-', $option = PINYIN_DEFAULT)
    {
        if (\is_int($delimiter)) {
            list($option, $delimiter) = array($delimiter, '-');
        }

        if (!in_array($delimiter, array('_', '-', '.', ''), true)) {
            throw new InvalidArgumentException("Delimiter must be one of: '_', '-', '', '.'.");
        }

        return implode($delimiter, $this->convert($string, $option | \PINYIN_KEEP_NUMBER | \PINYIN_KEEP_ENGLISH));
    }
public function permalink ( $ string , $ delimiter = '-' , $ option = PINYIN_DEFAULT ) { if ( \ is_int ( $ delimiter ) ) { list ( $ option , $ delimiter ) = array ( $ delimiter , '-' ) ; } if ( ! in_array ( $ delimiter , array ( '_' , '-' , '.' , '' ) , true ) ) { throw new InvalidArgumentException ( "Delimiter must be one of: '_', '-', '', '.'." ) ; } return implode ( $ delimiter , $ this -> convert ( $ string , $ option | \ PINYIN_KEEP_NUMBER | \ PINYIN_KEEP_ENGLISH ) ) ; }
Return a pinyin permalink from string.

@param string $string
@param string $delimiter
@param int    $option

@return string
Return a pinyin permalink from string .