public function getHeadwords($class = null, $words = [])
    {
        // Method One:
        if ($class === null || $class === false || (is_string($class) && empty($class))) {
            $query = Headword::find();
        } else {
            $extensions = ExtensionManager::getModels($class);
            $guids = [];
            foreach ($extensions as $extension) {
                $guids[] = $extension->guid;
            }
            $query = Headword::find()->guid($guids);
        }
        if (is_array($words) && !empty($words)) {
            $query = $query->word($words);
        }
        foreach ($query->all() as $headword) {
            yield $headword;
        }
        // Method Two:
        //return Headword::find()->all();
    }