Overtrue\Pinyin\Pinyin::getLoader PHP 메소드

getLoader() 공개 메소드

Return dict loader,.
public getLoader ( ) : Overtrue\Pinyin\DictLoaderInterface
리턴 Overtrue\Pinyin\DictLoaderInterface
    public function getLoader()
    {
        if (!$this->loader instanceof DictLoaderInterface) {
            $dataDir = dirname(__DIR__) . '/data/';
            $loaderName = $this->loader;
            $this->loader = new $loaderName($dataDir);
        }
        return $this->loader;
    }