magicalella / yii2-wswordpress

Component for Yii 2 framework vs Wordpress WS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yii2-wswordpress

Modulo per integrare la Yii con Wordpress

Documentazione API WP https://developer.wordpress.org/rest-api/

Installation

The preferred way to install this extension is through composer.

Run

php composer.phar require magicalella/yii2-wswordpress 

or add

"magicalella/yii2-wswordpress": "*"

to the require section of your composer.json file.

Usage

  1. Add component to your config file
'components' => [
    // ...
    'wswordpress' => [
        'class' => 'magicalella\wswordpress\Wswordpress',
        'endpoint' => 'URL API Wordpress',
        'method' => 'GET'
    ],
]
  1. Get dato to WP
$wswordpress = Yii::$app->wswordpress;
$result = $wswordpress->call('wp/v2/...',[
    'param'=>value_param
    ]
);

About

Component for Yii 2 framework vs Wordpress WS

License:GNU General Public License v3.0


Languages

Language:PHP 100.0%