maxodrom / yii2-seo
Yii2 SEO 组件
1.1.2
2018-06-06 19:47 UTC
Requires
- yiisoft/yii2: ~2.0.0
Requires (Dev)
- codeception/codeception: ~2.0
- codeception/specify: ~1.1
- codeception/verify: ~1.0
- phpunit/phpunit: ^7.0
- yiisoft/yii2-coding-standards: ~2.0.0
- yiisoft/yii2-debug: ~2.0.0
- yiisoft/yii2-faker: ~2.0.0
- yiisoft/yii2-gii: ~2.0.0
This package is not auto-updated.
Last update: 2024-09-25 01:40:36 UTC
README
Yii2 SEO 组件是一个包含一些有用类的包,这些类提供了常用方法来处理和加工 SEO 文本。
SeoText 类
提供有用的方法来处理源文本并收集关于处理文本的统计信息。
use maxodrom\yii2seo\components\SeoText; // instantiate new SeoText object $seoText = new SeoText($model->textField); // get total words in our text $totalWords = $seoText->getWordsCount(); // get total characters count (including different spaces chars) $totalCharacters = $seoText->getTotalCharactersCount(); // get only word's characters count $wordCharacters = $seoText->getCharactersCount(); // get all spaces count $totalSpaces = $seoText->getSpacesCount();