Skip to content

bscheshirwork/yii2-hiart

 
 

Repository files navigation

HiArt

Tools to use API as ActiveRecord for Yii2

Latest Stable Version Total Downloads Build Status Code Coverage Scrutinizer Code Quality Dependency Status

Use your API as ActiveRecord

Installation

The preferred way to install this yii2-extension is through composer.

Either run

php composer.phar require "hiqdev/yii2-hiart"

or add

"hiqdev/yii2-hiart": "*"

to the require section of your composer.json.

Configuration

To use this extension, configure hiart component in your application config:

    'components' => [
        'hiart' => [
            'class' => 'hiqdev\hiart\Connection',
            'config' => [
                'api_url' => 'https://api.site.com/',
            ],
        ],
    ],

Usage

Define your Model

class MyModel extends \hiqdev\hiart\ActiveRecord
{
    public function attributes()
    {
        return ['id', 'name', 'else'];
    }
}

License

This project is released under the terms of the BSD-3-Clause license. Read more here.

Copyright © 2015-2016, HiQDev (http://hiqdev.com/)

Acknowledgments

About

Tools to use API as ActiveRecord for Yii2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%