thewulf7 / yii2-wikipedia
Yii component to connect with Wikipedia
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/thewulf7/yii2-wikipedia
Requires
- php: >=5.4.0
- yiisoft/yii2: *
Requires (Dev)
- phpunit/php-invoker: >=1.1.0@stable
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2025-10-03 23:19:03 UTC
README
Installation
Begin by installing this package through Composer.
{ "require": { "thewulf7/wikipedia": "dev-master" } }
'components' => [ ... 'wikipedia' => [ 'class' => 'thewulf7\Wikipedia\Connection' ] ... ]
Usage
Retrieve page extract
$wiki = \Yii::$app->get('wikipedia'); return $wiki->createCommand()->search('Rome')->getSentences(5);
Same with QueryBuilder
$query = new \thewulf7\Wikipedia\Query(); $query ->titles('Rome'); return $query ->createCommand() ->getSentences(5);