예제 #1
0
파일: Pinyin.php 프로젝트: hjltony/pinyin-1
 /**
  * Constructor.
  *
  * set dictionary path.
  */
 private function __construct()
 {
     if (is_null(static::$dictionary)) {
         self::$dictionary = json_decode(file_get_contents(dirname(__DIR__) . '/data/dict.php'), true);
     }
 }
예제 #2
0
 /**
  * Constructor.
  *
  * set dictionary path.
  */
 private function __construct()
 {
     if (is_null(static::$dictionary)) {
         self::$dictionary = unserialize(file_get_contents(__DIR__ . '/data/dict.php'));
     }
 }